Skip to content

Instantly share code, notes, and snippets.

@soorepalli
Forked from karelbemelmans/docker-compose.yml
Created May 11, 2019 10:20
Show Gist options
  • Save soorepalli/2f78428f89d14f41fe34da094f37e139 to your computer and use it in GitHub Desktop.
Save soorepalli/2f78428f89d14f41fe34da094f37e139 to your computer and use it in GitHub Desktop.
A Docker compose file to create a Drupal 8 with MySQL stack, useable for local development.
# Basicly taken from:
# https://github.com/docker-library/drupal/issues/3#issuecomment-153775540
#
# Volume containers are the way to go.
version: '2'
services:
drupal:
image: drupal:8
links:
- "db:mysql"
ports:
- "80:80"
volumes:
- storage-drupal:/var/www/html/modules
- storage-drupal:/var/www/html/profiles
- storage-drupal:/var/www/html/themes
- storage-drupal:/var/www/html/sites
db:
image: mysql
volumes:
- storage-mysql:/var/lib/mysql
environment:
- MYSQL_USER=db_user
- MYSQL_PASSWORD=db_pass
- MYSQL_DATABASE=drupal8
- MYSQL_ROOT_PASSWORD=db_root_pass
volumes:
storage-drupal:
driver: local
storage-mysql:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment