Skip to content

Instantly share code, notes, and snippets.

@colorfield
Created November 18, 2017 09:29
Show Gist options
  • Save colorfield/85ec9b6f5eb9bf624533079cc355cc9a to your computer and use it in GitHub Desktop.
Save colorfield/85ec9b6f5eb9bf624533079cc355cc9a to your computer and use it in GitHub Desktop.
Drupal with PostgreSQL, example provided by https://hub.docker.com/_/drupal/
# 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:8.4-apache
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
restart: always
postgres:
image: postgres:9.6
environment:
POSTGRES_PASSWORD: example
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment