Created
February 5, 2025 05:35
-
-
Save hussam-aldarwish/f1a37c226dcbcbb7abfa822e62531dcb to your computer and use it in GitHub Desktop.
WordPress Development Setup with Docker
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
version: '3.9' | |
services: | |
wordpress: | |
image: wordpress:latest | |
container_name: wordpress | |
ports: | |
- "8080:80" | |
environment: | |
WORDPRESS_DB_HOST: db | |
WORDPRESS_DB_USER: myuser | |
WORDPRESS_DB_PASSWORD: mypassword | |
WORDPRESS_DB_NAME: mydatabase | |
volumes: | |
- ./wordpress:/var/www/html | |
depends_on: | |
- db | |
db: | |
image: mysql:5.7 | |
container_name: wordpress_db | |
ports: | |
- "3306:3306" | |
environment: | |
MYSQL_ROOT_PASSWORD: rootpassword | |
MYSQL_DATABASE: mydatabase | |
MYSQL_USER: myuser | |
MYSQL_PASSWORD: mypassword | |
volumes: | |
- db_data:/var/lib/mysql | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
container_name: phpmyadmin | |
ports: | |
- "8081:80" | |
environment: | |
PMA_HOST: db | |
PMA_USER: myuser | |
PMA_PASSWORD: mypassword | |
volumes: | |
db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment