Hangar/docker/deployment/docker-compose.yml
MiniDigger b216eeff2e don't try to create hangar db twice
Signed-off-by: MiniDigger <admin@minidigger.me>
2020-10-01 10:10:23 +02:00

101 lines
3.5 KiB
YAML

version: '3.7'
services:
app:
image: registry.gitlab.com/minidigger/hangar2/app:latest
build:
context: ../..
dockerfile: docker/deployment/hangar/Dockerfile
depends_on:
- 'db'
- 'auth'
- 'mail'
stdin_open: true
labels:
- "traefik.enable=true"
- "traefik.http.services.hangar.loadbalancer.server.port=8080"
- "traefik.http.routers.hangar.rule=Host(`hangar.minidigger.me`)"
- "traefik.http.routers.hangar.entrypoints=web-secure"
- "traefik.http.routers.hangar.tls=true"
- "traefik.http.routers.hangar.tls.options=default"
- "traefik.http.routers.hangar.tls.certresolver=default"
- "traefik.http.routers.hangar.tls.domains[0].main=minidigger.me"
- "traefik.http.routers.hangar.tls.domains[0].sans=*.minidigger.me"
networks:
- web
db:
image: registry.gitlab.com/minidigger/hangar2/db:latest
build: ./db
environment:
POSTGRES_MULTIPLE_DATABASES: hangar,hangarauth
POSTGRES_USER: hangar
POSTGRES_PASSWORD: 'hangar'
ports:
- "2345:5432" # pls dont abuse open port :/
volumes:
- db_data:/var/lib/postgresql/data
networks:
- web
labels:
- "traefik.enable=false"
mail:
image: mailhog/mailhog:latest
labels:
- "traefik.enable=true"
- "traefik.http.services.hangar-mail.loadbalancer.server.port=8025"
- "traefik.http.routers.hangar-mail.middlewares=basicauth@file"
- "traefik.http.routers.hangar-mail.rule=Host(`hangar-mail.minidigger.me`)"
- "traefik.http.routers.hangar-mail.entrypoints=web-secure"
- "traefik.http.routers.hangar-mail.tls=true"
- "traefik.http.routers.hangar-mail.tls.options=default"
- "traefik.http.routers.hangar-mail.tls.certresolver=default"
- "traefik.http.routers.hangar-mail.tls.domains[0].main=minidigger.me"
- "traefik.http.routers.hangar-mail.tls.domains[0].sans=*.minidigger.me"
networks:
- web
auth:
image: registry.gitlab.com/minidigger/hangarauth
depends_on:
- 'db'
labels:
- "traefik.enable=true"
- "traefik.http.services.hangar-auth.loadbalancer.server.port=8000"
- "traefik.http.routers.hangar-auth.rule=Host(`hangar-auth.minidigger.me`)"
- "traefik.http.routers.hangar-auth.entrypoints=web-secure"
- "traefik.http.routers.hangar-auth.tls=true"
- "traefik.http.routers.hangar-auth.tls.options=default"
- "traefik.http.routers.hangar-auth.tls.certresolver=default"
- "traefik.http.routers.hangar-auth.tls.domains[0].main=minidigger.me"
- "traefik.http.routers.hangar-auth.tls.domains[0].sans=*.minidigger.me"
environment:
SECRET_KEY: "TzNc3RTpfVn1xxNV90PPGEfs7SZhy5"
EMAIL_HOST: "mail"
EMAIL_PORT: "1025"
EMAIL_SSL: "false"
EMAIL_TLS: "false"
EMAIL_HOST_USER: "dum"
EMAIL_HOST_PASSWORD: "dum"
DB_NAME: "hangarauth"
DB_USER: "hangar"
DB_PASSWORD: "hangar"
DB_HOST: "hangar_db"
REDIS_HOST: "hangar_redis"
SSO_ENDPOINT_ore: "{ 'sync_sso_endpoint': ('http://hangar_app:9000/api/sync_sso'), 'sso_secret': 'changeme', 'api_key': 'changeme' }"
DEBUG: "true" # for reasons I don't understand, auth only runs with debug right now. don't question it, unless you want to fix it
DJANGO_SETTINGS_MODULE: "spongeauth.settings.prod"
networks:
- web
redis:
image: redis:6.0.6
networks:
- web
networks:
web:
name: traefik-overlay
external: true
volumes:
db_data:
uploads: