Created
November 26, 2018 13:16
-
-
Save leanfj/1b495817e83989e472ae115471aac98b to your computer and use it in GitHub Desktop.
Docker compose for Wordpress + phpmyadmin
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: '2' | |
services: | |
wordpress: | |
depends_on: | |
- db | |
image: wordpress:latest | |
restart: always | |
volumes: | |
- ./wp-content:/var/www/html/wp-content | |
environment: | |
WORDPRESS_DB_HOST: db:3306 | |
WORDPRESS_DB_PASSWORD: leanfj | |
ports: | |
- 80:80 | |
- 443:443 | |
networks: | |
- back | |
db: | |
image: mysql:5.7 | |
restart: always | |
volumes: | |
- db_data:/var/lib/mysql2 | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_USER: wp_user | |
MYSQL_PASSWORD: wp_user_pass | |
MYSQL_DATABASE: wordpress | |
networks: | |
- back | |
phpmyadmin: | |
depends_on: | |
- db | |
image: phpmyadmin/phpmyadmin | |
restart: always | |
ports: | |
- 8080:80 | |
environment: | |
PMA_HOST: db | |
MYSQL_ROOT_PASSWORD: wp_user_pass | |
networks: | |
- back | |
networks: | |
back: | |
volumes: | |
db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run docker-compose up --build -d