-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
116 lines (110 loc) · 3.02 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
version: '3.4'
services:
wp_dev:
build:
context: ./
dockerfile: docker/Dockerfile_wp
target: dev
args:
PHP_BUILD_VERSION: $PHP_BUILD_VERSION
PHP_TEST_VERSION: $PHP_TEST_VERSION
PHP_DEPS_VERSION: $PHP_DEPS_VERSION
PROJECT_MOUNT_PATH: $PROJECT_MOUNT_PATH
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
DOCROOT_PATH: $DOCROOT_PATH
WP_DOMAIN: ${WP_DOMAIN}
container_name: "${PROJECT_NAME}_wp_dev"
depends_on:
- db
restart: unless-stopped
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_NAME: $DB_NAME
WORDPRESS_DB_USER: $DB_USER_NAME
WORDPRESS_DB_PASSWORD: $DB_USER_PASSWORD
WORDPRESS_DEBUG: 1
DOCROOT_PATH: ${DOCROOT_PATH}
PLUGIN_NAME: ${PLUGIN_NAME}
ADMIN_USER: ${ADMIN_USER}
ADMIN_PASS: ${ADMIN_PASS}
ADMIN_EMAIL: ${ADMIN_EMAIL}
WP_DOMAIN: ${WP_DOMAIN}
WP_TITLE: ${WP_TITLE}
volumes:
- wordpress:${DOCROOT_PATH}
- ${BASE_PATH}:${PROJECT_MOUNT_PATH}
- ${BASE_PATH}/vendor/inpsyde/multilingualpress:/var/www/html/wp-content/plugins/multilingualpress
ports:
- 80:80
db:
image: mariadb:latest
container_name: "${PROJECT_NAME}_db"
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER_NAME
MYSQL_PASSWORD: $DB_USER_PASSWORD
ports:
- 3306:3306
volumes:
- db:/var/lib/mysql
db_admin:
image: phpmyadmin/phpmyadmin:latest
container_name: "${PROJECT_NAME}_db_admin"
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
depends_on:
- db
ports:
- 1234:80
# volumes:
# - db_admin
composer:
build:
context: ./
dockerfile: docker/Dockerfile_wp
target: composer
args:
PHP_DEPS_VERSION: $PHP_DEPS_VERSION
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
container_name: "${PROJECT_NAME}_composer"
working_dir: ${BUILD_ROOT_PATH}
volumes:
- ${BASE_PATH}:${BUILD_ROOT_PATH}
environment:
- COMPOSER_MEMORY_LIMIT=${COMPOSER_MEMORY_LIMIT}
build:
build:
context: ./
dockerfile: docker/Dockerfile_wp
target: build
args:
PHP_DEPS_VERSION: $PHP_DEPS_VERSION
PHP_BUILD_VERSION: $PHP_BUILD_VERSION
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
container_name: "${PROJECT_NAME}_build"
working_dir: ${BUILD_ROOT_PATH}
volumes:
- ${BASE_PATH}:${BUILD_ROOT_PATH}
test:
extra_hosts:
- "host.docker.internal:${HOST_IP_ADDRESS}"
build:
context: ./
dockerfile: docker/Dockerfile_wp
target: test
args:
PHP_DEPS_VERSION: $PHP_DEPS_VERSION
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
PHP_BUILD_VERSION: $PHP_BUILD_VERSION
PHP_TEST_VERSION: $PHP_TEST_VERSION
container_name: "${PROJECT_NAME}_test"
working_dir: ${BUILD_ROOT_PATH}
volumes:
- ${BASE_PATH}:${BUILD_ROOT_PATH}
volumes:
wordpress:
db:
db_admin: