Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
79 lines (76 loc) · 2.85 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
79 lines (76 loc) · 2.85 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
# Development — latest WP + latest PHP (fast, modern)
# Usage: docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d
services:
wordpress:
image: wordpress:7.1-php8.4-apache
ports:
- "8889:80"
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wp
WORDPRESS_DB_PASSWORD: wp
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
volumes:
- ./zest-cmp.php:/var/www/html/wp-content/plugins/zest-cmp/zest-cmp.php
- ./uninstall.php:/var/www/html/wp-content/plugins/zest-cmp/uninstall.php
- ./readme.txt:/var/www/html/wp-content/plugins/zest-cmp/readme.txt
- ./LICENSE:/var/www/html/wp-content/plugins/zest-cmp/LICENSE
- ./includes:/var/www/html/wp-content/plugins/zest-cmp/includes
- ./dist:/var/www/html/wp-content/plugins/zest-cmp/dist
- ./languages:/var/www/html/wp-content/plugins/zest-cmp/languages
- wp-uploads-dev:/var/www/html/wp-content/uploads
depends_on:
db:
condition: service_healthy
db:
image: mysql:8.4
environment:
MYSQL_DATABASE: wordpress
MYSQL_USER: wp
MYSQL_PASSWORD: wp
MYSQL_ROOT_PASSWORD: root
volumes:
- db-data-dev:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-proot"]
interval: 5s
timeout: 3s
retries: 10
wp-cli:
image: wordpress:cli-php8.2
volumes:
- wp-data:/var/www/html
- ./zest-cmp.php:/var/www/html/wp-content/plugins/zest-cmp/zest-cmp.php
- ./uninstall.php:/var/www/html/wp-content/plugins/zest-cmp/uninstall.php
- ./readme.txt:/var/www/html/wp-content/plugins/zest-cmp/readme.txt
- ./LICENSE:/var/www/html/wp-content/plugins/zest-cmp/LICENSE
- ./includes:/var/www/html/wp-content/plugins/zest-cmp/includes
- ./dist:/var/www/html/wp-content/plugins/zest-cmp/dist
- ./languages:/var/www/html/wp-content/plugins/zest-cmp/languages
depends_on:
db:
condition: service_healthy
wordpress:
condition: service_started
entrypoint: |
/bin/sh -c '
sleep 5
until wp core is-installed --allow-root 2>/dev/null; do
if [ -f /var/www/html/wp-includes/version.php ]; then break; fi
sleep 2
done
wp core install --url=http://localhost:8889 --title="Zest CMP Dev" --admin_user=admin --admin_password=admin --admin_email=admin@example.com --allow-root
wp plugin activate zest-cmp --allow-root
wp rewrite flush --allow-root
echo "=== Dev (WP 7.1 + PHP 8.4) is ready ==="
echo "URL: http://localhost:8889"
echo "Admin: http://localhost:8889/wp-admin (admin / admin)"
tail -f /dev/null
'
volumes:
db-data-dev:
wp-uploads-dev: