2020-09-02 06:00:51 +08:00
|
|
|
version: '3.7'
|
|
|
|
|
|
|
|
services:
|
2021-02-06 02:04:28 +08:00
|
|
|
frontend:
|
2021-02-08 05:32:28 +08:00
|
|
|
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'
|
2021-02-08 05:32:28 +08:00
|
|
|
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`)"
|
2020-09-30 21:38:45 +08:00
|
|
|
- "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:
|
2021-02-08 05:32:28 +08:00
|
|
|
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"
|
2020-10-30 21:50:25 +08:00
|
|
|
volumes:
|
|
|
|
- hangar_data:/hangar/uploads
|
2020-09-02 06:00:51 +08:00
|
|
|
networks:
|
|
|
|
- web
|
|
|
|
db:
|
2021-02-08 05:32:28 +08:00
|
|
|
image: "ghcr.io/papermc/hangar_db"
|
2020-09-02 06:00:51 +08:00
|
|
|
build: ./db
|
|
|
|
environment:
|
2020-10-01 16:29:40 +08:00
|
|
|
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"
|
2020-09-30 21:38:45 +08:00
|
|
|
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' }"
|
2020-10-01 05:11:14 +08:00
|
|
|
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
|
2020-10-01 02:37:43 +08:00
|
|
|
redis:
|
|
|
|
image: redis:6.0.6
|
2020-10-01 04:17:57 +08:00
|
|
|
networks:
|
|
|
|
- web
|
2020-09-02 06:00:51 +08:00
|
|
|
|
|
|
|
networks:
|
|
|
|
web:
|
|
|
|
name: traefik-overlay
|
|
|
|
external: true
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
db_data:
|
2020-10-30 21:50:25 +08:00
|
|
|
hangar_data:
|