Created
February 10, 2026 18:17
-
-
Save pjaudiomv/f4eb4e7547eb9a45cf84dab973ec707d to your computer and use it in GitHub Desktop.
Wordpress Docker Compose
This file contains hidden or 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: | |
| depends_on: | |
| - db | |
| build: . | |
| restart: always | |
| ports: | |
| - 8080:80 | |
| - 7443:443 | |
| environment: | |
| WORDPRESS_DEBUG: true | |
| WORDPRESS_DB_HOST: db:3306 | |
| WORDPRESS_DB_USER: wordpress | |
| WORDPRESS_DB_PASSWORD: wordpress | |
| WORDPRESS_DB_NAME: wordpress | |
| volumes: | |
| # Mount the entire public_html directory as the WordPress root | |
| - ./site:/var/www/html | |
| # Separate logs directory | |
| - ./logs/:/var/log/apache2 | |
| db: | |
| image: mariadb:10.11 | |
| restart: always | |
| ports: | |
| - 3306:3306 | |
| environment: | |
| MARIADB_ROOT_PASSWORD: somewordpress | |
| MARIADB_DATABASE: wordpress | |
| MARIADB_USER: wordpress | |
| MARIADB_PASSWORD: wordpress | |
| volumes: | |
| - ./init.sql:/docker-entrypoint-initdb.d/001-init.sql | |
| - db_data:/var/lib/mysql | |
| volumes: | |
| db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment