Hangar/docker/deployment/docker-compose.yml
MiniDigger 0732e429ef prepare deployment
Signed-off-by: MiniDigger <admin@benndorf.dev>
2021-11-26 07:56:34 +01:00

86 lines
2.7 KiB
YAML

version: '3.7'
services:
frontend:
image: "ghcr.io/papermc/hangar_frontend"
build:
context: ../..
dockerfile: docker/deployment/hangar-frontend/Dockerfile
depends_on:
- 'backend'
environment:
# keep these in sync with gh-action!
proxyHost: "http://hangar_new_backend:8080"
authHost: "https://hangar-auth.benndorf.dev"
host: "0.0.0.0"
PUBLIC_HOST: "https://hangar.benndorf.dev"
stdin_open: true
labels:
- "traefik.enable=true"
- "traefik.http.services.hangar-new.loadbalancer.server.port=3000"
- "traefik.http.routers.hangar-new.rule=Host(`hangar-new.minidigger.me`) || Host(`hangar.benndorf.dev`) || Host(`staging.hangarmc.dev`)"
- "traefik.http.routers.hangar-new.entrypoints=web-secure"
- "traefik.http.routers.hangar-new.tls=true"
- "traefik.http.routers.hangar-new.tls.certresolver=default"
- "traefik.http.routers.hangar-new.tls.domains[0].main=minidigger.me"
- "traefik.http.routers.hangar-new.tls.domains[0].sans=*.minidigger.me"
networks:
- web
backend:
image: "ghcr.io/papermc/hangar_backend"
build:
context: ../..
dockerfile: docker/deployment/hangar-backend/Dockerfile
environment:
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
SSO_CLIENT_ID: "${SSO_CLIENT_ID}"
TOKEN_SECRET: "${TOKEN_SECRET}"
depends_on:
- 'db'
- 'mail'
stdin_open: true
labels:
- "traefik.enable=false"
volumes:
- hangar_data:/hangar/uploads
networks:
- web
db:
image: cockroachdb/cockroach:latest-v21.2
ports:
- "26257:26257"
- "26000:8080"
volumes:
- cockroach_data:/cockroach/cockroach-data
command:
- "start-single-node"
- "--insecure"
networks:
- web
labels:
- "traefik.enable=false"
mail:
image: mailhog/mailhog:latest
labels:
- "traefik.enable=true"
- "traefik.http.services.hangar-new-mail.loadbalancer.server.port=8025"
- "traefik.http.routers.hangar-new-mail.middlewares=basicauth@file"
- "traefik.http.routers.hangar-new-mail.rule=Host(`hangar-new-mail.minidigger.me`) || Host(`hangar-mail.benndorf.dev`)"
- "traefik.http.routers.hangar-new-mail.entrypoints=web-secure"
- "traefik.http.routers.hangar-new-mail.tls=true"
- "traefik.http.routers.hangar-new-mail.tls.certresolver=default"
- "traefik.http.routers.hangar-new-mail.tls.domains[0].main=minidigger.me"
- "traefik.http.routers.hangar-new-mail.tls.domains[0].sans=*.minidigger.me"
networks:
- web
networks:
web:
name: traefik-overlay
external: true
volumes:
cockroach_data:
hangar_data: