-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (65 loc) · 2.36 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
version: "3.3"
services:
database:
container_name: ${PROJECT_NAME}_database
platform: linux/x86_64
image: mysql:${MYSQL_VERSION}
restart: always
ports:
- "${DB_EXTERNAL_PORT}:3306"
environment:
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
volumes:
- ${DB_DUMP_DIR}:/docker-entrypoint-initdb.d
- ${HOST_STORAGE_DIR}/data:/var/lib/mysql
node:
container_name: ${PROJECT_NAME}_node
build:
context: .
dockerfile: .docker/node/Dockerfile
args:
NODE_VERSION: ${NODE_VERSION}
restart: always
volumes:
- ${HOST_THEME_DIR}:/app/
- node_modules:/app/node_modules/
web:
container_name: ${PROJECT_NAME}_web
depends_on:
- database
- node
build:
context: .
dockerfile: .docker/web/Dockerfile
args:
PHP_VERSION: ${PHP_VERSION}
NODE_VERSION: ${NODE_VERSION}
WEB_ROOT_DIR: ${WEB_ROOT_DIR}
ACF_PRO_KEY: ${ACF_PRO_KEY}
COMPOSER_AUTH: '{"http-basic":{"composer.deliciousbrains.com":{"username":"${DELICIOUS_BRAINS_COMPOSER_API_USERNAME}","password":"${DELICIOUS_BRAINS_COMPOSER_API_PASSWORD}"}}}'
restart: always
ports:
- "${WEB_EXTERNAL_PORT}:80"
volumes:
# Mount composer.* files so we can run `compose update` and `composer install`
# inside container and then commit changes back to our central GitHub repo.
- ./composer.lock:${WEB_ROOT_DIR}/composer.lock
- ./composer.json:${WEB_ROOT_DIR}/composer.json
# Configuration files
- ${HOST_CONFIG_DIR}/.htaccess:${WEB_ROOT_DIR}/.htaccess
- ${HOST_CONFIG_DIR}/index.php:${WEB_ROOT_DIR}/index.php
- ${HOST_CONFIG_DIR}/wp-config.php:${WEB_ROOT_DIR}/wp-config.php
# Theme directory
- ${HOST_THEME_DIR}:${WEB_ROOT_DIR}/app/themes/wlion/
# Plugin directories
- ${HOST_PLUGINS_DIR}/wlion-login-lockdown/:${WEB_ROOT_DIR}/app/plugins/wlion-login-lockdown/
- ${HOST_PLUGINS_DIR}/wlion-wp-custom-system-emails/:${WEB_ROOT_DIR}/app/plugins/wlion-wp-custom-system-emails/
# Uploads storage
- ${HOST_STORAGE_DIR}/uploads:${WEB_ROOT_DIR}/app/uploads/
# Avoid overwriting `node_modules` directories
- node_modules:${WEB_ROOT_DIR}/app/themes/wlion/node_modules/
volumes:
node_modules: