-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
128 lines (115 loc) · 2.64 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
117
118
119
120
121
122
123
124
125
126
127
128
services:
base:
image: alpine
server-base:
image: nginx:stable-alpine
volumes:
- .:/app
- ./docker/nginx/templates:/etc/nginx/templates
- ./error_log:/error_log
- ./src:/app/public/packages/plugins/pdf-manager
environment:
PHP_VERSION: ${PHP_VERSION}
PUBLIC_PATH: ${PUBLIC_PATH}
WP_UPSTREAM: ${WP_UPSTREAM:-fpm}
server:
extends:
service: server-base
ports:
- "80:80"
links:
- fpm
php-base:
build:
context: ./docker/php
target: base
network: host
args:
PHP_VERSION: ${PHP_VERSION}
PHP_EXTRA_EXTENSIONS: ${PHP_EXTRA_EXTENSIONS:-}
XDEBUG_VERSION: ${XDEBUG_VERSION:-}
environment:
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-off}
DB_HOST: ${DB_HOST}
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_PREFIX: ${DB_PREFIX:-wp_}
AUTH_KEY: ${AUTH_KEY}
SECURE_AUTH_KEY: ${SECURE_AUTH_KEY}
LOGGED_IN_KEY: ${LOGGED_IN_KEY}
NONCE_KEY: ${NONCE_KEY}
AUTH_SALT: ${AUTH_SALT}
SECURE_AUTH_SALT: ${SECURE_AUTH_SALT}
LOGGED_IN_SALT: ${LOGGED_IN_SALT}
NONCE_SALT: ${NONCE_SALT}
WP_DEBUG: ${WP_DEBUG}
WP_HOME: ${WP_HOME}
WP_SITEURL: ${WP_SITEURL}
volumes:
- .:/app
- ./src:/app/public/packages/plugins/pdf-manager
extra_hosts:
- host.docker.internal:${HOST_IP:-172.17.0.1}
cli:
extends:
service: php-base
build:
target: cli
depends_on:
- db
volumes:
- ~/docker_cache/wp-cli:/.wp-cli/cache/
fpm-base:
extends:
service: php-base
build:
target: fpm
fpm:
extends:
service: fpm-base
depends_on:
- db
db-base:
extends:
service: base
image: ${DB_SERVICE}:${DB_SERVICE_VERSION:-latest}
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
ports:
- "3306"
db:
extends:
service: db-base
volumes:
- dev_mysql_data:/var/lib/mysql
- ./docker/mariadb/initdb.d:/docker-entrypoint-initdb.d
composer:
image: composer
volumes:
- .:/app
- ~/.docker_cache/composer:/tmp/cache
phpqa:
build:
context: ./docker/php
target: phpqa
args:
PHP_VERSION: ${PHP_VERSION}
volumes:
- ./:/app
phpcs:
extends:
service: phpqa
build:
context: ./docker/php
target: phpcs
entrypoint: ["phpcs"]
phpstan:
extends:
service: phpqa
entrypoint: ["phpstan", "--memory-limit=512M"]
volumes:
dev_mysql_data: