services: wordpress: image: wordpress:php8.3-apache restart: unless-stopped working_dir: /var/www/html/wordpress 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_PUBLIC_URL: ${WORDPRESS_PUBLIC_URL:?Set the public HTTPS URL ending in /wordpress} WORDPRESS_CONFIG_EXTRA: | define('DISALLOW_FILE_EDIT', true); define('WP_HOME', getenv('WORDPRESS_PUBLIC_URL')); define('WP_SITEURL', getenv('WORDPRESS_PUBLIC_URL')); define('FORCE_SSL_ADMIN', true); volumes: - wordpress:/var/www/html/wordpress 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: