Skip to content

Instantly share code, notes, and snippets.

@fschoenfeldt
Created September 5, 2019 07:09
Show Gist options
  • Save fschoenfeldt/904b45c1a8632a4c53433cb443231cd8 to your computer and use it in GitHub Desktop.
Save fschoenfeldt/904b45c1a8632a4c53433cb443231cd8 to your computer and use it in GitHub Desktop.
Drupal in Docker - docker-compose.yml
# Drupal with PostgreSQL
#
# Access via "http://localhost:8080"
# (or "http://$(docker-machine ip):8080" if using docker-machine)
#
# During initial Drupal setup,
# Database type: PostgreSQL
# Database name: postgres
# Database username: postgres
# Database password: example
# ADVANCED OPTIONS; Database host: postgres
version: '3.1'
services:
drupal:
image: drupal:latest
ports:
- 8080:80
volumes:
- /var/www/html/modules
- /var/www/html/profiles
- /var/www/html/themes
# this takes advantage of the feature in Docker that a new anonymous
# volume (which is what we're creating here) will be initialized with the
# existing content of the image at the same location
- /var/www/html/sites
postgres:
image: postgres:10
environment:
POSTGRES_PASSWORD: example
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment