Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment