Created
January 25, 2025 19:42
-
-
Save josvaal/a7f8336492654a65e125d0e8146915d7 to your computer and use it in GitHub Desktop.
Docker WordPress
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
version: '3.9' | |
services: | |
database: | |
image: mysql:8.0 | |
restart: always | |
command: --default-authentication-plugin=mysql_native_password | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: wordpress | |
MYSQL_USER: wordpress | |
MYSQL_PASSWORD: wordpress | |
volumes: | |
- db_data:/var/lib/mysql | |
networks: | |
- wpsite | |
wordpress: | |
image: wordpress:latest | |
depends_on: | |
- database | |
ports: | |
- "8000:80" | |
restart: always | |
environment: | |
WORDPRESS_DB_HOST: database:3306 | |
WORDPRESS_DB_USER: wordpress | |
WORDPRESS_DB_PASSWORD: wordpress | |
volumes: | |
- .:/var/www/html | |
- ./uploads.ini:/user/local/etc/php/conf.d/uploads.ini | |
networks: | |
- wpsite | |
phpmyadmin: | |
depends_on: | |
- database | |
image: phpmyadmin/phpmyadmin | |
restart: always | |
ports: | |
- "8090:80" | |
environment: | |
PMA_HOST: database | |
MYSQL_ROOT_PASSWORD: password | |
networks: | |
- wpsite | |
networks: | |
wpsite: | |
volumes: | |
db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment