-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
96 lines (89 loc) · 2.68 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
93
94
95
96
version: '2'
services:
data:
image: tianon/true
restart: on-failure
volumes:
- ./wordpress:/var/www/html/wordpress
- ./wp-content:/var/www/html/wp-content
- ./wp-config:/var/www/html/wp-config
- ./wp-tests:/var/www/html/wp-tests
- ./data/redis:/data
- ./data/mysql:/var/lib/mysql
- ./logs/nginx:/srv/logs/nginx
- ./logs/php:/srv/logs/php-fpm
- ./logs/xdebug:/srv/logs/xdebug
- ./config/mysql:/docker-entrypoint-initdb.d
- ./config/nginx/conf.d/local.conf:/etc/nginx/conf.d/default.conf:ro
- ./config/nginx/ssl:/etc/ssl
- ./config/php/conf.d/wordpress.ini:/usr/local/etc/php/conf.d/wordpress.ini
- ./bin/build.sh:/usr/local/bin/build.sh
redis:
image: redis:3.2-alpine
restart: on-failure
ports:
- 6379:6379
volumes_from:
- data
networks:
- backend
mysql:
image: mariadb:10.1
restart: on-failure
ports:
- 3306:3306
volumes_from:
- data
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
networks:
- backend
php:
image: xwpco/php:7.1-fpm-alpine
restart: on-failure
links:
- mysql
- redis
volumes_from:
- data
environment:
WP_ENV: ${WP_ENV}
WP_DB_HOST: ${WP_DB_HOST}
WP_DB_NAME: ${WP_DB_NAME}
WP_DB_USER: ${WP_DB_USER}
WP_DB_PASSWORD: ${WP_DB_PASSWORD}
WP_THEME_NAME: ${WP_THEME_NAME}
WP_DOMAIN: ${WP_DOMAIN}
WP_ADMIN_USER: ${WP_ADMIN_USER}
WP_ADMIN_PASSWORD: ${WP_ADMIN_PASSWORD}
WP_ADMIN_EMAIL: ${WP_ADMIN_EMAIL}
WP_VERSION: ${WP_VERSION}
WP_TITLE: ${WP_TITLE}
WP_DEBUG: ${WP_DEBUG}
XDEBUG_CONFIG: ${XDEBUG_CONFIG}
PHP_IDE_CONFIG: ${PHP_IDE_CONFIG}
FORCE_SSL_ADMIN: ${FORCE_SSL_ADMIN}
command: /bin/ash -c "/usr/local/bin/build.sh --with-tests && php-fpm"
networks:
- backend
nginx:
image: nginx:1.11-alpine
restart: on-failure
volumes_from:
- data
links:
- php
ports:
- 80:80
- 443:443
networks:
- backend
- frontend
networks:
frontend:
driver: bridge
backend:
driver: bridge