Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
172 lines (162 loc) · 4.81 KB
/
Copy pathdocker-compose.yml
File metadata and controls
172 lines (162 loc) · 4.81 KB
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
172
services:
wordpress:
build:
context: ./docker/wp
image: development-assistant-wordpress:php8.2-apache-xdebug
restart: unless-stopped
working_dir: /app/wp
depends_on:
- db
- mailpit
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_NAME: ${WP_DB_NAME:-wordpress}
WORDPRESS_DB_USER: ${WP_DB_USER:-wordpress}
WORDPRESS_DB_PASSWORD: ${WP_DB_PASSWORD:-wordpress}
WP_PORT: ${WP_PORT:-21601}
WP_URL_SYNC_ATTEMPTS: ${WP_URL_SYNC_ATTEMPTS:-15}
WP_SITE_TITLE: ${WP_SITE_TITLE:-Development Assistant Local}
WP_ADMIN_USER: ${WP_ADMIN_USER:-admin}
WP_ADMIN_PASSWORD: ${WP_ADMIN_PASSWORD:-admin}
WP_ADMIN_EMAIL: ${WP_ADMIN_EMAIL:-admin@example.com}
REQUIRED_PLUGINS: ${REQUIRED_PLUGINS:-query-monitor wp-crontrol user-switching wp-migrate-db}
WP_CLI_CACHE_DIR: /tmp/wp-cli-cache
XDEBUG_MODE: ${XDEBUG_MODE:-off}
XDEBUG_START_WITH_REQUEST: ${XDEBUG_START_WITH_REQUEST:-trigger}
XDEBUG_CLIENT_HOST: ${XDEBUG_CLIENT_HOST:-host.docker.internal}
XDEBUG_CLIENT_PORT: ${XDEBUG_CLIENT_PORT:-21699}
XDEBUG_DISCOVER_CLIENT_HOST: ${XDEBUG_DISCOVER_CLIENT_HOST:-0}
XDEBUG_IDEKEY: ${XDEBUG_IDEKEY:-DEVELOPMENT_ASSISTANT}
PHP_IDE_CONFIG: ${PHP_IDE_CONFIG:-serverName=development-assistant}
volumes:
- ./:/app
- ./scripts/init-wp.sh:/usr/local/bin/init-wp.sh:ro
- ./scripts/sync-wp-env.sh:/usr/local/bin/sync-wp-env.sh:ro
tmpfs:
- /var/www/html
proxy:
image: nginx:1.27-alpine
restart: unless-stopped
depends_on:
- wordpress
ports:
- "${WP_PORT:-21601}:443"
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./docker/certs:/etc/nginx/certs:ro
db:
image: mariadb:11.4
restart: unless-stopped
environment:
MARIADB_DATABASE: ${WP_DB_NAME:-wordpress}
MARIADB_USER: ${WP_DB_USER:-wordpress}
MARIADB_PASSWORD: ${WP_DB_PASSWORD:-wordpress}
MARIADB_ROOT_PASSWORD: ${WP_DB_ROOT_PASSWORD:-root}
volumes:
- db_data:/var/lib/mysql
test-db:
image: mariadb:11.4
profiles:
- test
environment:
MARIADB_DATABASE: wordpress_tests
MARIADB_USER: wordpress_tests
MARIADB_PASSWORD: wordpress_tests
MARIADB_ROOT_PASSWORD: root
tmpfs:
- /var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 2s
timeout: 2s
retries: 30
mailpit:
image: axllent/mailpit:latest
restart: unless-stopped
ports:
- "${MAILPIT_PORT:-21603}:8025"
wp-cli:
build:
context: ./docker/wp-cli
image: development-assistant-wp-cli:php8.2
profiles:
- tools
depends_on:
- db
- wordpress
user: "33:33"
working_dir: /app/wp
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_NAME: ${WP_DB_NAME:-wordpress}
WORDPRESS_DB_USER: ${WP_DB_USER:-wordpress}
WORDPRESS_DB_PASSWORD: ${WP_DB_PASSWORD:-wordpress}
WP_PORT: ${WP_PORT:-21601}
WP_URL_SYNC_ATTEMPTS: ${WP_URL_SYNC_ATTEMPTS:-15}
WP_SITE_TITLE: ${WP_SITE_TITLE:-Development Assistant Local}
WP_ADMIN_USER: ${WP_ADMIN_USER:-admin}
WP_ADMIN_PASSWORD: ${WP_ADMIN_PASSWORD:-admin}
WP_ADMIN_EMAIL: ${WP_ADMIN_EMAIL:-admin@example.com}
REQUIRED_PLUGINS: ${REQUIRED_PLUGINS:-query-monitor wp-crontrol user-switching wp-migrate-db}
WP_CLI_CACHE_DIR: /tmp/wp-cli-cache
volumes:
- ./:/app
- ./scripts/sync-wp-env.sh:/usr/local/bin/sync-wp-env.sh:ro
tmpfs:
- /var/www/html
wp-cli-release:
build:
context: ./docker/wp-cli
image: development-assistant-wp-cli:php8.2
profiles:
- tools
user: "33:33"
working_dir: /plugin-source
volumes:
- ./:/plugin-source
tmpfs:
- /plugin-source/wp
composer:
image: composer:2
profiles:
- tools
working_dir: /app
volumes:
- ./:/app
phpunit:
build:
context: ./docker/wp
image: development-assistant-wordpress:php8.2-apache-xdebug
profiles:
- test
depends_on:
test-db:
condition: service_healthy
working_dir: /app
entrypoint:
- /app/vendor/bin/phpunit
command:
- --configuration
- /app/phpunit.xml.dist
environment:
WP_PHPUNIT__TESTS_CONFIG: /app/tests/wp-tests-config.php
WP_PHPUNIT__TABLE_PREFIX: wptests_
WP_TESTS_DB_HOST: test-db
WP_TESTS_DB_NAME: wordpress_tests
WP_TESTS_DB_USER: wordpress_tests
WP_TESTS_DB_PASSWORD: wordpress_tests
WP_TESTS_CORE_DIR: /app/wp
XDEBUG_MODE: "off"
volumes:
- ./:/app
tmpfs:
- /var/www/html
adminer:
image: adminer:latest
restart: unless-stopped
depends_on:
- db
ports:
- "${ADMINER_PORT:-21602}:8080"
volumes:
db_data: