-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
67 lines (62 loc) · 1.52 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
version: "3"
services:
nginx:
shm_size: 128mb
image: nginx
depends_on:
- wordpress
ports:
- ${WP_PORT}:80
volumes:
- wordpress:/var/www/html
- ./:/var/www/html/wp-content/themes/${WP_THEME}
- ./tools/local-env/nginx.conf:/etc/nginx/conf.d/default.conf
#
# WordPress
#
wordpress:
shm_size: 128mb
image: wordpress:fpm-alpine
depends_on:
- mysql
environment:
WORDPRESS_DB_HOST: "mysql:3306"
WORDPRESS_DB_NAME: "wordpress"
WORDPRESS_DB_USER: "wordpress"
WORDPRESS_DB_PASSWORD: "wordpress"
volumes:
- wordpress:/var/www/html
- ./tools/local-env/php-config.ini:/usr/local/etc/php/conf.d/php-config.ini
- ./:/var/www/html/wp-content/themes/${WP_THEME}
mysql:
shm_size: 128mb
image: mysql:5.7
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: "wordpress"
MYSQL_USER: "wordpress"
MYSQL_PASSWORD: "wordpress"
volumes:
- mysql:/var/lib/mysql
cli:
image: wordpress:cli
volumes:
- wordpress:/var/www/html
- ./:/var/www/html/wp-content/themes/${WP_THEME}
installer:
shm_size: 256mb
image: wordpress:cli
depends_on:
- mysql
- wordpress
volumes:
- wordpress:/var/www/html
- ./:/var/www/html/wp-content/themes/${WP_THEME}
- ./:/app
command: >
bash /app/tools/wait-for.sh mysql:3306 -t 120 -- bash /app/tools/install.sh ${WP_PORT}
volumes:
wordpress:
driver: local
mysql:
driver: local