Created
April 16, 2025 23:42
-
-
Save joepreludian/830ef026ce76974f6211760118b35e3d to your computer and use it in GitHub Desktop.
Wordpress Docker Compose File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
wordpress: | |
image: 'wordpress:latest' | |
volumes: | |
- 'wordpress-files:/var/www/html' | |
environment: | |
- SERVICE_FQDN_WORDPRESS | |
- WORDPRESS_DB_HOST=mariadb | |
- WORDPRESS_DB_USER=$SERVICE_USER_WORDPRESS | |
- WORDPRESS_DB_PASSWORD=$SERVICE_PASSWORD_WORDPRESS | |
- WORDPRESS_DB_NAME=wordpress | |
depends_on: | |
- mariadb | |
healthcheck: | |
test: | |
- CMD | |
- curl | |
- '-f' | |
- 'http://127.0.0.1' | |
interval: 2s | |
timeout: 10s | |
retries: 10 | |
mariadb: | |
image: 'mariadb:11' | |
volumes: | |
- 'mariadb-data:/var/lib/mysql' | |
environment: | |
- MYSQL_ROOT_PASSWORD=$SERVICE_PASSWORD_ROOT | |
- MYSQL_DATABASE=wordpress | |
- MYSQL_USER=$SERVICE_USER_WORDPRESS | |
- MYSQL_PASSWORD=$SERVICE_PASSWORD_WORDPRESS | |
healthcheck: | |
test: | |
- CMD | |
- healthcheck.sh | |
- '--connect' | |
- '--innodb_initialized' | |
interval: 5s | |
timeout: 20s | |
retries: 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment