Hangar/docker/deployment/docker-compose.yml

86 lines
2.7 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:
# keep these in sync with gh-action!
proxyHost: "http://hangar_new_backend:8080"
authHost: "https://hangar-auth.benndorf.dev"
2021-02-08 07:02:17 +08:00
host: "0.0.0.0"
PUBLIC_HOST: "https://hangar.benndorf.dev"
2020-09-02 06:00:51 +08:00
stdin_open: true
labels:
- "traefik.enable=true"
2021-02-08 06:49:00 +08:00
- "traefik.http.services.hangar-new.loadbalancer.server.port=3000"
2021-07-07 01:15:32 +08:00
- "traefik.http.routers.hangar-new.rule=Host(`hangar-new.minidigger.me`) || Host(`hangar.benndorf.dev`) || Host(`staging.hangarmc.dev`)"
2021-02-08 06:49:00 +08:00
- "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"
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
2021-07-01 02:12:01 +08:00
environment:
2021-07-01 03:06:47 +08:00
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
SSO_CLIENT_ID: "${SSO_CLIENT_ID}"
2021-07-01 05:19:04 +08:00
TOKEN_SECRET: "${TOKEN_SECRET}"
2021-02-06 02:04:28 +08:00
depends_on:
- 'db'
- '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: cockroachdb/cockroach:latest-v21.2
2020-09-02 06:00:51 +08:00
ports:
- "26257:26257"
- "26000:8080"
2020-09-02 06:00:51 +08:00
volumes:
- cockroach_data:/cockroach/cockroach-data
command:
- "start-single-node"
- "--insecure"
2020-09-02 06:00:51 +08:00
networks:
- web
labels:
- "traefik.enable=false"
mail:
image: mailhog/mailhog:latest
labels:
- "traefik.enable=true"
2021-02-08 06:49:00 +08:00
- "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`)"
2021-02-08 06:49:00 +08:00
- "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"
2020-09-02 06:00:51 +08:00
networks:
- web
networks:
web:
name: traefik-overlay
external: true
volumes:
cockroach_data:
hangar_data: