Created
April 22, 2022 19:01
-
-
Save dejurin/97bdbc6c5a2395b0d5319ac46a0edca2 to your computer and use it in GitHub Desktop.
How to Deploy Wordpress with Docker (WordPress/MariaDB/Adminer)
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: | |
db: | |
image: mariadb:latest | |
platform: linux/amd64 | |
volumes: | |
- ./db_data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_TCP_PORT: 3310 | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: wordpress | |
MYSQL_USER: wordpress | |
MYSQL_PASSWORD: wordpress | |
ports: | |
- "3310:3310" | |
networks: | |
- wordpress_demo | |
adminer: | |
image: adminer | |
restart: always | |
ports: | |
- "8002:8080" | |
depends_on: | |
- db | |
networks: | |
- wordpress_demo | |
wordpress: | |
image: wordpress:latest | |
volumes: | |
- ./wordpress_data:/var/www/html | |
restart: always | |
platform: linux/amd64 | |
environment: | |
WORDPRESS_DB_HOST: db:3310 | |
WORDPRESS_DB_USER: wordpress | |
WORDPRESS_DB_PASSWORD: wordpress | |
WORDPRESS_DB_NAME: wordpress | |
ports: | |
- "8001:80" | |
depends_on: | |
- db | |
networks: | |
- wordpress_demo | |
networks: | |
wordpress_demo: | |
driver: bridge | |
volumes: | |
db_data: | |
phpmyadmin_data: | |
wordpress_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment