-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwordpress-multi-fpm.yml
68 lines (60 loc) · 1.4 KB
/
wordpress-multi-fpm.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
version: '3.1'
services:
web:
image: nginx
restart: always
volumes:
- ./nginx_conf/nginx.conf:/etc/nginx/nginx.conf
- ./nginx_conf/conf.d:/etc/nginx/conf.d
- site1_html:/site1:ro
- site1_content:/site1/wp-content:ro
- site2_html:/site2:ro
- site2_content:/site2/wp-content:ro
ports:
- 80:80
networks:
- front
site1:
# new tag: stop stack, remove site1_html volume, start stack
image: wordpress:php7.1-fpm-alpine
restart: always
environment:
WORDPRESS_DB_PASSWORD: example
WORDPRESS_TABLE_PREFIX: site1_
networks:
- front
- back
volumes:
- site1_html:/var/www/html
- site1_content:/var/www/html/wp-content
site2:
# new tag: stop stack, remove site2_html volume, start stack
image: wordpress:php7.1-fpm-alpine
restart: always
environment:
WORDPRESS_DB_PASSWORD: example
WORDPRESS_TABLE_PREFIX: site2_
networks:
- front
- back
volumes:
- site2_html:/var/www/html
- site2_content:/var/www/html/wp-content
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
networks:
- back
volumes:
- db_data:/var/lib/mysql
networks:
front:
back:
volumes:
site1_html:
site1_content:
site2_html:
site2_content:
db_data: