Created
January 7, 2026 23:30
-
-
Save xardit/7404bf627c43bdd0723b912271863179 to your computer and use it in GitHub Desktop.
Quick Wordpress site on clean env
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: | |
| image: wordpress:latest | |
| container_name: wordpress | |
| volumes: | |
| - ./wp-content:/var/www/html/wp-content | |
| environment: | |
| - WORDPRESS_DB_NAME=wordpress | |
| - WORDPRESS_TABLE_PREFIX=wp_ | |
| - WORDPRESS_DB_HOST=db | |
| - WORDPRESS_DB_USER=wp | |
| - WORDPRESS_DB_PASSWORD=wppassword | |
| depends_on: | |
| - db | |
| - phpmyadmin | |
| restart: always | |
| ports: | |
| - 80:80 | |
| db: | |
| image: mariadb:lts | |
| container_name: db | |
| volumes: | |
| - db_data:/var/lib/mysql | |
| # This is optional!!! | |
| - ./wordpress.sql:/docker-entrypoint-initdb.d/dump.sql | |
| # # # | |
| environment: | |
| - MARIADB_DATABASE=wordpress | |
| - MARIADB_ROOT_PASSWORD=rootpassword | |
| - MARIADB_USER=wp | |
| - MARIADB_PASSWORD=wppassword | |
| restart: always | |
| phpmyadmin: | |
| depends_on: | |
| - db | |
| image: phpmyadmin/phpmyadmin:latest | |
| container_name: phpmyadmin | |
| restart: always | |
| ports: | |
| - 127.0.0.1:8180:80 | |
| environment: | |
| PMA_HOST: db | |
| MYSQL_ROOT_PASSWORD: password | |
| redis: | |
| image: redis:7-alpine | |
| container_name: redis | |
| restart: unless-stopped | |
| #command: ["redis-server", "--appendonly", "yes", "--save", "60", "1", "--loglevel", "warning"] | |
| ports: | |
| - 127.0.0.1:6379:6379 | |
| #volumes: | |
| #- ./data:/data | |
| healthcheck: | |
| test: ["CMD", "redis-cli", "ping"] | |
| interval: 10s | |
| timeout: 3s | |
| retries: 5 | |
| volumes: | |
| db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment