Last active
September 5, 2022 12:50
-
-
Save mrabro/1d0abf92aa0a09ed7b78320e21bedff1 to your computer and use it in GitHub Desktop.
Localhost development wordpress docker
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" | |
services: | |
mysql_db: | |
container_name: "wordpress_db" | |
environment: | |
MYSQL_DATABASE: wordpress_db | |
MYSQL_PASSWORD: wordpress_user_password | |
MYSQL_ROOT_PASSWORD: wordpress_password | |
MYSQL_USER: wordpress_user | |
image: "mariadb:10.6.4-focal" | |
restart: always | |
command: '--default-authentication-plugin=mysql_native_password' | |
volumes: | |
- "mysql:/var/lib/mysql" | |
wordpress: | |
container_name: "wordpress_site" | |
depends_on: | |
- mysql_db | |
environment: | |
WORDPRESS_DB_HOST: "mysql_db:3306" | |
WORDPRESS_DB_NAME: wordpress_db | |
WORDPRESS_DB_PASSWORD: wordpress_user_password | |
WORDPRESS_DB_USER: wordpress_user | |
image: "wordpress:latest" | |
ports: | |
- "80:80" | |
restart: always | |
volumes: | |
- "./:/var/www/html/wordpress" | |
phpmyadmin: | |
depends_on: | |
- mysql_db | |
image: phpmyadmin/phpmyadmin:latest | |
container_name: wordpress_phpmyadmin | |
restart: always | |
ports: | |
- 8080:80 | |
environment: | |
PMA_HOST: mysql_db | |
MYSQL_ROOT_PASSWORD: wordpress_password | |
UPLOAD_LIMIT: 500M | |
volumes: | |
mysql: {} | |
# docker-compose up -d | |
# accessing via localhost/wordpress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment