-
Notifications
You must be signed in to change notification settings - Fork 6
/
common-services.yml
172 lines (158 loc) · 4.16 KB
/
common-services.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
services:
base:
build:
context: .
dockerfile: ./environment/docker/php/Dockerfile
target: base
args:
PHP_VERSION: ${PHP_VERSION}
XDEBUG_VERSION: ${XDEBUG_VERSION}
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE}
HTTP_USER: ${HTTP_USER}
volumes:
- ./:/app:z
- ~/.docker_cache/wp-cli:/.wp-cli/cache:z
- ./deploy/.ssh:/root/.ssh:z
extra_hosts:
- "host.docker.internal:${HOST_DOCKER_INTERNAL_IP}"
# WP base
wordpress-base:
extends:
service: base
environment:
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_HOST: ${DB_HOST}
DB_CHARSET: ${DB_CHARSET}
DB_COLLATE: ${DB_COLLATE}
DB_TABLE_PREFIX: ${DB_TABLE_PREFIX}
WP_LANG: ${WP_LANG}
WP_HOME: ${WP_HOME}
WP_SITEURL: ${WP_SITEURL}
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}
MULTISITE: ${MULTISITE}
SUBDOMAIN_INSTALL: ${SUBDOMAIN_INSTALL}
DOMAIN_CURRENT_SITE: ${DOMAIN_CURRENT_SITE}
PATH_CURRENT_SITE: ${PATH_CURRENT_SITE}
WP_DEBUG: ${WP_DEBUG}
LOG_STREAM: ${LOG_STREAM}
LOG_LEVEL: ${LOG_LEVEL}
ASSETS_URL: ${ASSETS_URL}
THEME_ACTIVE: ${THEME_ACTIVE}
UPLOADS_DIR: ${UPLOADS_DIR}
GLOTPRESS_PROJECT_ENV_URL: ${GLOTPRESS_PROJECT_ENV_URL}
VERSION: ${VERSION}
REGISTRY_ENDPOINT: ${REGISTRY_ENDPOINT}
REPOSITORY_NAME: ${REPOSITORY_NAME}
# WP CLI
cli:
extends:
service: wordpress-base
build:
target: cli-development
# Install WordPress
installer:
extends:
service: cli
environment:
WP_TITLE: ${WP_TITLE}
WP_USER: ${WP_USER}
WP_PASSWORD: ${WP_PASSWORD}
WP_EMAIL: ${WP_EMAIL}
PERMALINK: ${PERMALINK}
DEACTIVATE_PLUGINS: ${DEACTIVATE_PLUGINS}
entrypoint: ["aztlan-install"]
volumes:
- ./environment/bin/aztlan-install:/usr/local/bin/aztlan-install:z
# PHP-FPM with WP dependencies
wordpress:
extends:
service: wordpress-base
build:
target: fpm-development
# Nginx
server:
build:
context: ./environment/docker/nginx
target: development
ports:
- "80:80"
links:
- wordpress
environment:
WORDPRESS: ${WORDPRESS}
NGINX_ENVSUBST_OUTPUT_DIR: /etc/nginx/conf.d-from-template/
CACHE_CONTROL: ${CACHE_CONTROL}
volumes:
- ./:/app:z
- ./environment/docker/nginx/etc/nginx.conf:/etc/nginx/nginx.conf:z
- ./environment/docker/nginx/etc/conf.d:/etc/nginx/conf.d:z
- ./environment/docker/nginx/etc/templates:/etc/nginx/templates:z
- ./environment/docker/nginx/etc/conf.d-from-template:/etc/nginx/conf.d-from-template:z
# MariaDB
db:
image: mariadb
environment:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- mysql_data:/var/lib/mysql
- ./environment/initdb:/docker-entrypoint-initdb.d:z
# Node 20 with NPM/Yarn/npx
assets-node:
image: node:${NODE_VERSION}
volumes:
- ./:/app:z
- ~/.docker_cache/npm:/.npm:z
working_dir: /app/assets
# PHPQA
phpqa:
extends:
service: base
build:
target: phpqa
# Test SMTP server
smtp:
image: mailhog/mailhog
restart: always
ports:
- "8025:8025"
# Deployer
deployer:
extends:
service: base
build:
target: deployer
# Xdebug profiling viewer
webgrind:
image: wodby/webgrind
ports:
- "8000:8080"
volumes:
- ./xdebug:/tmp:z
- ./:/app:z
# Composer
composer:
image: composer
volumes:
- .:/app:z
- ~/.docker_cache/composer:/tmp/cache:z
# Codecept
codecept:
extends:
service: phpqa
entrypoint: ["/app/phpqa/vendor/bin/codecept"]