-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
108 lines (99 loc) · 4.32 KB
/
Copy pathdocker-compose.yml
File metadata and controls
108 lines (99 loc) · 4.32 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
# =============================================================================
# DevelopmentTranslation Bridge - Docker Compose Configuration
# =============================================================================
# Configuration is read from .env file (copy from .env.example)
# Run: docker-compose up -d
# =============================================================================
version: '3.8'
services:
# ---------------------------------------------------------------------------
# MySQL Database
# ---------------------------------------------------------------------------
db:
image: mysql:9.7.1
container_name: devtb-mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-wordpress}
MYSQL_DATABASE: ${MYSQL_DATABASE:-wordpress}
MYSQL_USER: ${MYSQL_USER:-wordpress}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-wordpress}
volumes:
- db_data:/var/lib/mysql
ports:
- "${MYSQL_PORT:-3306}:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD:-wordpress}"]
timeout: 5s
retries: 10
interval: 10s
# ---------------------------------------------------------------------------
# WordPress
# ---------------------------------------------------------------------------
wordpress:
depends_on:
db:
condition: service_healthy
image: wordpress:7.0.0-php8.4-apache
container_name: devtb-wordpress
restart: always
ports:
- "${WORDPRESS_PORT:-8080}:80"
extra_hosts:
# Enables host.docker.internal on Linux (already works on macOS/Windows)
- "host.docker.internal:host-gateway"
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: ${MYSQL_USER:-wordpress}
WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD:-wordpress}
WORDPRESS_DB_NAME: ${MYSQL_DATABASE:-wordpress}
# Pass through for PHP access
CLAUDE_API_KEY: ${CLAUDE_API_KEY:-}
WORDPRESS_CONFIG_EXTRA: |
/* =================================================================
* DevelopmentTranslation Bridge Configuration
* Generated from docker-compose.yml environment
* ================================================================= */
/* Debug Settings */
define('WP_DEBUG', ${WP_DEBUG:-true});
define('WP_DEBUG_LOG', ${WP_DEBUG_LOG:-true});
define('WP_DEBUG_DISPLAY', ${WP_DEBUG_DISPLAY:-false});
/* Vite Development Server Configuration */
define('DEVTB_VITE_PORT', '${VITE_PORT:-3000}');
define('DEVTB_VITE_HMR_HOST', '${VITE_HMR_HOST:-localhost}');
define('DEVTB_VITE_DOCKER_MODE', ${VITE_DOCKER_MODE:-true});
/* Security Keys - Read from environment or use defaults */
define('AUTH_KEY', '${AUTH_KEY:-put-your-unique-phrase-here}');
define('SECURE_AUTH_KEY', '${SECURE_AUTH_KEY:-put-your-unique-phrase-here}');
define('LOGGED_IN_KEY', '${LOGGED_IN_KEY:-put-your-unique-phrase-here}');
define('NONCE_KEY', '${NONCE_KEY:-put-your-unique-phrase-here}');
define('AUTH_SALT', '${AUTH_SALT:-put-your-unique-phrase-here}');
define('SECURE_AUTH_SALT', '${SECURE_AUTH_SALT:-put-your-unique-phrase-here}');
define('LOGGED_IN_SALT', '${LOGGED_IN_SALT:-put-your-unique-phrase-here}');
define('NONCE_SALT', '${NONCE_SALT:-put-your-unique-phrase-here}');
/* Claude API (optional - only if set in environment) */
if (getenv('CLAUDE_API_KEY')) {
define('CLAUDE_API_KEY', getenv('CLAUDE_API_KEY'));
}
volumes:
# Mount the theme directory for live development
- ./:/var/www/html/wp-content/themes/development-translation-bridge
# WordPress core files (persistent)
- wordpress_data:/var/www/html
# ---------------------------------------------------------------------------
# phpMyAdmin (Database Management - Optional)
# ---------------------------------------------------------------------------
phpmyadmin:
depends_on:
- db
image: phpmyadmin:5.2.3-apache
container_name: devtb-phpmyadmin
restart: always
ports:
- "${PHPMYADMIN_PORT:-8081}:80"
environment:
PMA_HOST: db
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-wordpress}
volumes:
db_data:
wordpress_data: