Created
August 24, 2018 20:22
-
-
Save ronnycoding/5075cc20cf044298cfe71ad33f7494b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.1' | |
networks: | |
drupal8: | |
external: false | |
services: | |
traefik: | |
container_name: ${DOMAIN}-traefik | |
image: traefik | |
command: --web --docker --docker.domain=${DOMAIN}.localhost --logLevel=DEBUG | |
ports: | |
- "82:80" | |
- "8082:8080" | |
- "8028:8025" | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- /dev/null:/traefik.toml | |
networks: | |
- drupal8 | |
drupal: | |
container_name: ${DOMAIN}-drupal | |
image: drupal:8-apache | |
volumes: | |
- ./modules:/var/www/html/modules | |
- ./profiles:/var/www/html/profiles | |
- ./themes:/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 | |
- ./sites:/var/www/html/sites | |
labels: | |
- "traefik.backend=app-${DOMAIN}" | |
- "traefik.frontend.rule=Host:app.${DOMAIN}.localhost" | |
# - "traefik.docker.network=drupal8" | |
restart: always | |
depends_on: | |
- postgres | |
networks: | |
- drupal8 | |
postgres: | |
container_name: ${DOMAIN}-postgres | |
image: postgres:10 | |
environment: | |
- POSTGRES_PGDATA=/var/lib/postgresql/data/pgdata | |
- POSTGRES_USER=${DB_USERNAME} | |
- POSTGRES_PASSWORD=${DB_PASSWORD} | |
- POSTGRES_DB=${DB_DATABASE} | |
restart: always | |
volumes: | |
- ./pgdata:/var/lib/postgresql/data | |
networks: | |
- drupal8 | |
labels: | |
- "traefik.enable=false" | |
adminer: | |
container_name: ${DOMAIN}-adminer | |
image: adminer | |
restart: always | |
links: | |
- postgres | |
labels: | |
- "traefik.backend=adminer-${DOMAIN}" | |
- "traefik.frontend.rule=Host:adminer.${DOMAIN}.localhost" | |
- "traefik.port=8080" | |
networks: | |
- drupal8 | |
mailhog: | |
container_name: ${DOMAIN}-mailhog | |
image: mailhog/mailhog | |
labels: | |
- "traefik.backend=mail-${DOMAIN}" | |
- "traefik.frontend.rule=Host:mail.${DOMAIN}.localhost" | |
- "traefik.port=8025" | |
networks: | |
- drupal8 | |
volumes: | |
db: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment