-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
77 lines (72 loc) · 1.56 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
version: "3.8"
services:
database:
deploy:
placement:
constraints:
- "node.role == manager"
replicas: 1
restart_policy:
condition: any
environment:
- MYSQL_ROOT_PASSWORD=roottoor
- MYSQL_USER=wpdb
- MYSQL_PASSWORD=Password123
- MYSQL_DATABASE=wpdb
image: mariadb:latest
networks:
- backend-net
ports:
- "127.0.0.1:3306:3306"
volumes:
- ./database/mariadb.cnf:/etc/mysql/conf.d/mariadb.cnf
- ./database/initdb.d:/docker-entrypoint-initdb.d
- db_vol:/var/lib/mysql
phpmyadmin:
deploy:
placement:
constraints:
- "node.role == manager"
replicas: 1
restart_policy:
condition: any
environment:
- PMA_HOST=database
- UPLOAD_LIMIT=1024000000
image: phpmyadmin/phpmyadmin:latest
networks:
- backend-net
ports:
- "127.0.0.1:9000:80"
wordpress:
deploy:
mode: replicated
placement:
constraints:
- "node.role == worker"
replicas: 1
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: any
environment:
- WORDPRESS_DB_HOST=database:3306
- WORDPRESS_DB_USER=wpdb
- WORDPRESS_DB_NAME=wpdb
- WORDPRESS_DB_PASSWORD=Password123
image: wordpress:5.5-php7.4-apache
ports:
- "80:80"
networks:
- backend-net
volumes:
- wp_vol:/var/www/html
networks:
backend-net:
driver: overlay
driver_opts:
encrypted: ""
volumes:
db_vol:
wp_vol: