2026-10-08 21:29:44 +00:00
|
|
|
services:
|
|
|
|
|
wordpress:
|
|
|
|
|
image: wordpress:php8.3-apache
|
|
|
|
|
restart: unless-stopped
|
2026-10-08 21:51:21 +00:00
|
|
|
working_dir: /var/www/html/wordpress
|
2026-10-08 21:29:44 +00:00
|
|
|
ports:
|
|
|
|
|
- "127.0.0.1:${WORDPRESS_PORT:-18404}:80"
|
|
|
|
|
environment:
|
|
|
|
|
WORDPRESS_DB_HOST: db:3306
|
|
|
|
|
WORDPRESS_DB_NAME: wordpress
|
|
|
|
|
WORDPRESS_DB_USER: wordpress
|
|
|
|
|
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD:?Set a database password in the Stack secret bindings}
|
2026-10-08 21:51:21 +00:00
|
|
|
WORDPRESS_PUBLIC_URL: ${WORDPRESS_PUBLIC_URL:?Set the public HTTPS URL ending in /wordpress}
|
2026-10-08 21:29:44 +00:00
|
|
|
WORDPRESS_CONFIG_EXTRA: |
|
|
|
|
|
define('DISALLOW_FILE_EDIT', true);
|
2026-10-08 21:51:21 +00:00
|
|
|
define('WP_HOME', getenv('WORDPRESS_PUBLIC_URL'));
|
|
|
|
|
define('WP_SITEURL', getenv('WORDPRESS_PUBLIC_URL'));
|
|
|
|
|
define('FORCE_SSL_ADMIN', true);
|
2026-10-08 21:29:44 +00:00
|
|
|
volumes:
|
2026-10-08 21:51:21 +00:00
|
|
|
- wordpress:/var/www/html/wordpress
|
2026-10-08 21:29:44 +00:00
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
|
|
db:
|
|
|
|
|
image: mariadb:11.4
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
environment:
|
|
|
|
|
MARIADB_DATABASE: wordpress
|
|
|
|
|
MARIADB_USER: wordpress
|
|
|
|
|
MARIADB_PASSWORD: ${WORDPRESS_DB_PASSWORD:?Set a database password in the Stack secret bindings}
|
|
|
|
|
MARIADB_RANDOM_ROOT_PASSWORD: "yes"
|
|
|
|
|
volumes:
|
|
|
|
|
- database:/var/lib/mysql
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: [CMD, healthcheck.sh, --connect, --innodb_initialized]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 10
|
|
|
|
|
start_period: 30s
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
wordpress:
|
|
|
|
|
database:
|