Skip to content

Instantly share code, notes, and snippets.

@madscatter
Last active March 20, 2020 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madscatter/77931848efe526952dc0377c90339bad to your computer and use it in GitHub Desktop.
Save madscatter/77931848efe526952dc0377c90339bad to your computer and use it in GitHub Desktop.
version: '3.7'
services:
drupal:
image: drupal:latest
networks:
drupal_net:
volumes:
- drupal-vol-modules:/var/www/html/modules
- drupal-vol-profiles:/var/www/html/profiles
- drupal-vol-themes:/var/www/html/themes
- drupal-vol-sites:/var/www/html/sites
ports:
- 8080:80
depends_on:
- db
restart: always
db:
image: postgres:11
environment:
POSTGRES_DB: $POSTGRES_DB
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
networks:
drupal_net:
volumes:
- db-vol:/var/lib/postgresql/data
ports:
- 5433:5432
restart: always
networks:
drupal_net:
driver: bridge
volumes:
drupal-vol-modules:
driver_opts:
type: none
device: $PWD/data/html/modules
o: bind
drupal-vol-profiles:
driver_opts:
type: none
device: $PWD/data/html/profiles
o: bind
drupal-vol-themes:
driver_opts:
type: none
device: $PWD/data/html/themes
o: bind
drupal-vol-sites:
driver_opts:
type: none
device: $PWD/data/html/sites
o: bind
db-vol:
driver_opts:
type: none
device: $PWD/data/postgres
o: bind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment