-
-
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.
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
# 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