Skip to content

Instantly share code, notes, and snippets.

@cnra
Created October 15, 2019 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cnra/7029c3077945d816310a652613529291 to your computer and use it in GitHub Desktop.
Save cnra/7029c3077945d816310a652613529291 to your computer and use it in GitHub Desktop.
wordpress docker compose
version: '3'
services:
db:
image: mysql:5.7
restart: always
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
networks:
- wpsite
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
depends_on:
- db
ports:
- 8081:80
environment:
PMA_HOST: db
MYSQL_ROOT_PASWORD: password
networks:
- wpsite
wordpress:
image: wordpress
restart: always
depends_on: ['db']
volumes: ['./:/var/www/html']
ports:
- '8080:80'
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
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