39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
services:
|
|
wordpress:
|
|
image: wordpress:php8.3-apache
|
|
restart: unless-stopped
|
|
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}
|
|
WORDPRESS_CONFIG_EXTRA: |
|
|
define('DISALLOW_FILE_EDIT', true);
|
|
volumes:
|
|
- wordpress:/var/www/html
|
|
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:
|