Hangar/docker/deployment/docker-compose.yml

118 lines
3.9 KiB
YAML
Raw Normal View History

2020-09-02 06:00:51 +08:00
version: '3.7'
services:
2021-02-06 02:04:28 +08:00
frontend:
image: "ghcr.io/papermc/hangar_frontend"
2020-09-02 06:00:51 +08:00
build:
2021-02-08 06:15:33 +08:00
context: ../..
dockerfile: docker/deployment/hangar-frontend/Dockerfile
2020-09-02 06:00:51 +08:00
depends_on:
2021-02-06 02:04:28 +08:00
- 'backend'
environment:
proxyHost: "http://hangar_new_backend:8080"
2020-09-02 06:00:51 +08:00
stdin_open: true
labels:
- "traefik.enable=true"
2021-02-06 02:04:28 +08:00
- "traefik.http.services.hangar.loadbalancer.server.port=3000"
- "traefik.http.routers.hangar.rule=Host(`hangar-new.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"
2021-02-06 02:04:28 +08:00
networks:
- web
backend:
image: "ghcr.io/papermc/hangar_backend"
2021-02-06 02:04:28 +08:00
build:
context: ../..
dockerfile: docker/deployment/hangar-backend/Dockerfile
depends_on:
- 'db'
- 'auth'
- 'mail'
stdin_open: true
labels:
- "traefik.enable=false"
volumes:
- hangar_data:/hangar/uploads
2020-09-02 06:00:51 +08:00
networks:
- web
db:
image: "ghcr.io/papermc/hangar_db"
2020-09-02 06:00:51 +08:00
build: ./db
environment:
POSTGRES_MULTIPLE_DATABASES: hangarauth
POSTGRES_DB: hangar
2020-09-02 06:00:51 +08:00
POSTGRES_USER: hangar
POSTGRES_PASSWORD: 'hangar'
ports:
2021-02-08 05:04:54 +08:00
- "3456:5432" # pls dont abuse open port :/
2020-09-02 06:00:51 +08:00
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"
2021-02-06 02:04:28 +08:00
- "traefik.http.routers.hangar-mail.rule=Host(`hangar-new-mail.minidigger.me`)"
2020-09-02 06:00:51 +08:00
- "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"
2021-02-06 02:04:28 +08:00
- "traefik.http.routers.hangar-auth.rule=Host(`hangar-new-auth.minidigger.me`)"
2020-09-02 06:00:51 +08:00
- "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"
2021-02-06 02:04:28 +08:00
DB_HOST: "hangar_new_db"
REDIS_HOST: "hangar_new_redis"
SSO_ENDPOINT_ore: "{ 'sync_sso_endpoint': ('http://hangar_new_backend: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
2020-09-02 06:00:51 +08:00
DJANGO_SETTINGS_MODULE: "spongeauth.settings.prod"
networks:
- web
redis:
image: redis:6.0.6
networks:
- web
2020-09-02 06:00:51 +08:00
networks:
web:
name: traefik-overlay
external: true
volumes:
db_data:
hangar_data: