-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
100 lines (96 loc) · 2.87 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
97
98
99
100
version: '3'
services:
mysql:
image: ${MYSQL_IMAGE:-mariadb:latest}
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
TZ: ${DB_TZ:-Etc/UTC}
ports:
- 3306:3306
volumes:
# data dir is exported as a volume
- type: bind
source: ./wordflow_data
target: /var/lib/mysql
# - type: bind
# source: ./docker/mysql/data
# target: /var/lib/mysql
# configs if needed
# - type: bind
# source: ./docker_configs/mysql.cnf
# target: /etc/mysql/conf.d/mysql.cnf
restart: always
php:
build:
context: '.'
dockerfile: ./docker_configs/php/Dockerfile
args:
- ENVIRONMENT=${ENVIRONMENT}
env_file:
- ./docker_configs/.env.build.${ENVIRONMENT}
environment:
WORDPRESS_DB_HOST: ${DB_HOST:-mysql}
WORDPRESS_DB_USER: ${DB_USER}
WORDPRESS_DB_PASSWORD: ${DB_PASSWORD}
WORDPRESS_DB_NAME: ${DB_NAME}
# ports:
# - 9000:9000
volumes:
# - type: bind
# source: ./docker_configs/php/conf.d/${ENVIRONMENT}.php.ini
# target: /usr/local/etc/php/conf.d/php.ini
# - type: bind
# source: ./docker_configs/php/php-fpm.d/zzz-www.conf
# target: /usr/local/etc/php-fpm.d/zzz-www.conf
# source: ${pwd}/docker/php/php-fpm.d/
# target: /usr/local/etc/php-fpm.d/
# enable xdebug
- type: bind
source: "./docker_configs/xdebug.ini"
target: "/usr/local/etc/php/conf.d/xdebug.ini"
- type: bind
source: ./vendor/
target: /var/www/vendor/
# webroot direcotry is /var/www/web
- type: bind
source: ./bedrock/
target: /var/www/
- type: bind
source: ./${PLUGIN_DIR_NAME}
target: /var/www/web/app/plugins/${PLUGIN_DIR_NAME}/
# - type: bind
# source: ./docker/bedrock/${ENVIRONMENT}.env
# target: /var/www/html/.env
depends_on:
- mysql
restart: always
nginx:
# If SSL is not necessary, comment out several the lines below the "build:" section
# and uncomment the line starting with "image:".
build:
context: '.'
dockerfile: ./docker_configs/nginx/Dockerfile
# image: ${NGINX_IMAGE:-nginx:latest}
volumes:
- type: bind
source: ./docker_configs/nginx/conf.d/${ENVIRONMENT:-development}.conf
target: /etc/nginx/conf.d/default.conf
# webroot direcotry is /var/www/web
- type: bind
source: ./bedrock/web/
target: /var/www/web/
- type: bind
source: ./${PLUGIN_DIR_NAME}
target: /var/www/web/app/plugins/${PLUGIN_DIR_NAME}
ports:
- 80:80
# If SSL is not necessary, comment out the line below.
- 443:443
depends_on:
- php
restart: always
volumes:
wordflow_data: