forked from AmpereComputing/pi-day-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
93 lines (84 loc) · 2.05 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: "3"
services:
proxy:
restart: always
image: nginx:latest
networks:
- external_network
ports:
- 80:80
volumes:
- ./nginx/tmp:/var/run/nginx
- ./nginx/conf.d:/etc/nginx/conf.d
command: [ nginx-debug, '-g', 'daemon off;' ]
wordpress1:
restart: always
image: wordpress:6.1-apache
depends_on:
db:
condition: service_healthy
environment:
WORDPRESS_DB_HOST: 'db'
WORDPRESS_DB_USER: 'wordpress'
WORDPRESS_DB_PASSWORD: 'password1234'
WORDPRESS_DB_NAME: 'wordpress'
networks:
- external_network
volumes:
- ./wordpress:/var/www/html
wordpress2:
restart: always
image: wordpress:6.1-apache
depends_on:
db:
condition: service_healthy
environment:
WORDPRESS_DB_HOST: 'db'
WORDPRESS_DB_USER: 'wordpress'
WORDPRESS_DB_PASSWORD: 'password1234'
WORDPRESS_DB_NAME: 'wordpress'
networks:
- external_network
volumes:
- ./wordpress:/var/www/html
wordpress3:
restart: always
image: wordpress:6.1-apache
depends_on:
db:
condition: service_healthy
environment:
WORDPRESS_DB_HOST: 'db'
WORDPRESS_DB_USER: 'wordpress'
WORDPRESS_DB_PASSWORD: 'password1234'
WORDPRESS_DB_NAME: 'wordpress'
networks:
- external_network
volumes:
- ./wordpress:/var/www/html
db:
image: mysql/mysql-server:8.0
restart: always
environment:
MYSQL_DATABASE: 'wordpress'
MYSQL_USER: 'wordpress'
MYSQL_PASSWORD: 'password1234'
MYSQL_ROOT_PASSWORD: 'password'
healthcheck:
test: "mysql $$MYSQL_DATABASE -u$$MYSQL_USER -p$$MYSQL_PASSWORD -e 'SELECT 1;'"
interval: 20s
timeout: 10s
retries: 5
networks:
- external_network
volumes:
- ./mysql/wordpress:/var/lib/mysql
- ./mysql/logs:/var/log/mysql
- ./mysql/initdb:/docker-entrypoint-initdb.d
redis:
image: redis:latest
restart: always
networks:
- external_network
networks:
external_network: