-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (67 loc) · 2.22 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (67 loc) · 2.22 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
# Local WordPress for developing and verifying the plugin.
#
# docker compose up -d → http://localhost:8080
# docker compose down -v → tear down, including the database
#
# The repository is mounted straight into wp-content/plugins/jsray, so edits
# here are live in the running site — no rebuild, no re-copy. Only the files
# WordPress needs are mounted; tools/, tests/, and build/ stay out of the site.
services:
db:
image: mariadb:11
environment:
MARIADB_DATABASE: wordpress
MARIADB_USER: wordpress
MARIADB_PASSWORD: wordpress
MARIADB_ROOT_PASSWORD: wordpress
volumes:
- db:/var/lib/mysql
healthcheck:
test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized']
interval: 5s
retries: 20
wordpress:
# Tracks the latest WordPress. tools/dev-site.sh upgrades the site to the
# current release on every run, so `Tested up to` in readme.txt reflects
# what was actually exercised rather than whatever the image happened to ship.
image: wordpress:php8.3-apache
depends_on:
db:
condition: service_healthy
ports:
- '8080:80'
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
# Surface notices and deprecations instead of swallowing them — the point
# of this environment is to catch what static checks cannot.
WORDPRESS_DEBUG: '1'
WORDPRESS_CONFIG_EXTRA: |
define('WP_DEBUG_DISPLAY', true);
define('SCRIPT_DEBUG', true);
volumes:
- wp:/var/www/html
- .:/var/www/html/wp-content/plugins/jsray:ro
# wp-cli against the same site: install WordPress, activate the plugin, seed
# test content. Run one-off commands with:
# docker compose run --rm cli wp plugin list
cli:
image: wordpress:cli-php8.3
depends_on:
- wordpress
user: '33:33'
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
volumes:
- wp:/var/www/html
- .:/var/www/html/wp-content/plugins/jsray:ro
entrypoint: ['wp']
command: ['--info']
volumes:
db:
wp: