Skip to content

Instantly share code, notes, and snippets.

@karelbemelmans
Created March 6, 2016 21:46
Show Gist options
  • Save karelbemelmans/7b3ef04034955506102d to your computer and use it in GitHub Desktop.
Save karelbemelmans/7b3ef04034955506102d 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
@czarbl
Copy link

czarbl commented May 23, 2020

I used the same yml file so tell me what will be the output? my file is getting struck and not running for long time so i had to cancel it

output:

Hi, have you been able to run it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment