Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save veve90/ec79ed36af943953ba29ade35dc44630 to your computer and use it in GitHub Desktop.
Save veve90/ec79ed36af943953ba29ade35dc44630 to your computer and use it in GitHub Desktop.
Drupal with Postgres Docker Compose File
version: '2'
# Note: use the database service name `db` in the Host IP Address field ...
# Or, `docker container inspect {postgrescontainerid}` to obtain the IP Address needed for completing the Drupal setup screen.
services:
# Postgres
db:
image: postgres:9.6.5-alpine
restart: always
environment:
POSTGRES_DB: drupaldb
POSTGRES_USER: drupaluser
POSTGRES_PASSWORD: drupalpassword
volumes:
- db_data:/var/lib/postgresql/data
ports:
- 5432:5432
# Drupal
cms:
image: drupal:8.3.7-apache
restart: always
ports:
- 8080:80
volumes:
- cms_modules:/var/www/html/modules
- cms_profiles:/var/www/html/profiles
- cms_themes:/var/www/html/themes
- cms_sites:/var/www/html/sites
depends_on:
- db
# Volumes
volumes:
db_data:
cms_modules:
cms_profiles:
cms_themes:
cms_sites:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment