Skip to content

Instantly share code, notes, and snippets.

@kevinrodriguez-io
Created August 27, 2019 19:36
Show Gist options
  • Save kevinrodriguez-io/9e39e49cdecdfbe4f11cfb5875088944 to your computer and use it in GitHub Desktop.
Save kevinrodriguez-io/9e39e49cdecdfbe4f11cfb5875088944 to your computer and use it in GitHub Desktop.
docker-compose file for wordpress stack
version: '3'
services:
db:
image: mysql:5.7
volumes:
- db_data/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: PASSWORD_HERE
MYSQL_DATABASE: DATABASE_HERE
MYSQL_USER: USER_HERE
MYSQL_PASSWORD: PASSWORD_HERE
networks:
- wpsite
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- '8000:80'
restart: always
volumes: ['./:/var/www/html']
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: USER_HERE
WORDPRESS_DB_PASSWORD: PASSWORD_HERE
networks:
- wpsite
phpmyadmin:
depends_on:
- db
image: phpmyadmin/phpmyadmin
restart: always
ports:
- '8001:80'
environment:
PMA_HOST: db
MYSQL_ROOT_PASSWORD: PASSWORD_HERE
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