Skip to content

Instantly share code, notes, and snippets.

@morariu
Created November 25, 2020 17:25
Show Gist options
  • Save morariu/3e28bab57e53c881ab71c0fd81255d6d to your computer and use it in GitHub Desktop.
Save morariu/3e28bab57e53c881ab71c0fd81255d6d to your computer and use it in GitHub Desktop.
Docker Compose for Stack with Secrets
version: '3.1'
services:
drupal:
image: drupal:8.2
ports:
- 80:80
volumes:
- data:/var/lib/postgresql/data
- modules:/var/www/html/modules
- profiles:/var/www/html/profiles
- themes:/var/www/html/themes
- sites:/var/www/html/sites
postgres:
image: postgres:9.6
secrets:
- postgres_password
environment:
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
volumes:
- drupal-data:/var/lib/postgresql/data
secrets:
postgres_password:
external: true
volumes:
data:
modules:
profiles:
themes:
sites:
drupal-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment