Created
September 10, 2022 10:53
-
-
Save trinnguyen/fb96979fe2af7520064013387607d249 to your computer and use it in GitHub Desktop.
A docker compose that just works with Wordpress + MariaDB
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: | |
db: | |
image: mariadb | |
command: '--default-authentication-plugin=mysql_native_password' | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
- MYSQL_ROOT_PASSWORD=somewordpress | |
- MYSQL_DATABASE=wordpress | |
- MYSQL_USER=wordpress | |
- MYSQL_PASSWORD=wordpress | |
expose: | |
- 3306 | |
- 33060 | |
wordpress: | |
image: wordpress | |
ports: | |
- 9090:80 | |
restart: always | |
environment: | |
- WORDPRESS_DB_HOST=db | |
- WORDPRESS_DB_USER=wordpress | |
- WORDPRESS_DB_PASSWORD=wordpress | |
- WORDPRESS_DB_NAME=wordpress | |
volumes: | |
db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment