-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (62 loc) · 1.47 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
services:
wordpress:
image: wordpress:latest
restart: always
ports:
- 8081:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: exampleuser
WORDPRESS_DB_PASSWORD: examplepass
WORDPRESS_DB_NAME: exampledb
WORDPRESS_CONFIG_EXTRA: |
define('HEADLESS_SECRET_TOKEN', 'some-secret-token' );
volumes:
- ./wordpress/wp-content:/var/www/html/wp-content
- ./wordpress/wp.ini:/usr/local/etc/php/conf.d/wp.ini
proxy:
image: nginx:1.27
volumes:
- ./proxy:/etc/nginx/conf.d:ro
ports:
- 8080:80
restart: always
healthcheck:
test: ["CMD", "service", "nginx", "status"]
start_period: 1m
start_interval: 10s
interval: 1m
timeout: 5s
retries: 3
extra_hosts:
- "host.docker.internal:host-gateway"
db:
image: mariadb:10
restart: always
ports:
- 3306:3306
healthcheck:
test: [ "CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
start_period: 1m
start_interval: 10s
interval: 1m
timeout: 5s
retries: 3
environment:
MYSQL_DATABASE: exampledb
MYSQL_USER: exampleuser
MYSQL_PASSWORD: examplepass
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- db:/var/lib/mysql
redis:
image: redis:7.2
ports:
- 6379:6379
healthcheck:
test: [ "CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
volumes:
db: