From e0119e24be40f7fc640bd16305b24e6968653058 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Mon, 13 May 2024 20:23:44 +0200 Subject: [PATCH] added another container as I can't get the h1 AND h2 traeffic working otherwise --- docker-compose.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index c008c3e1..495abfe0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: volumes: - /root/credentials/backend-gcp-cloudsql-credentials.json:/secrets/cloudsql/credentials.json - backend: + backend_h1: image: ghcr.io/tum-dev/campus-backend/backend-server:main restart: unless-stopped labels: @@ -41,6 +41,38 @@ services: depends_on: db: condition: service_started + backend_h2: + image: ghcr.io/tum-dev/campus-backend/backend-server:main + restart: unless-stopped + labels: + - "traefik.enable=true" + - "traefik.http.routers.backend_h2.entrypoints=webs" + - "traefik.http.routers.backend_h2.tls.certresolver=leacme" + - "traefik.http.routers.backend_h2.rule=Host(`newapi.tum.app`) && Headers(`Content-Type`, `application/grpc`)" + - "traefik.http.services.backend_h2.loadbalancer.server.scheme=h2c" + - "traefik.http.services.backend_h2.loadbalancer.server.port=50051" + networks: + - traefik_traefik + expose: + - "50051" + environment: + - ENVIRONMENT=${ENVIRONMENT:-dev} + - DB_DSN=${DB_USER_NAME:-root}:${DB_USER_PASSWORD}@tcp(db:${DB_PORT:-3306})/${DB_NAME}?charset=utf8mb4&parseTime=True&loc=Local + - DB_NAME=${DB_NAME} + - SENTRY_DSN=${SENTRY_DSN} + - OMDB_API_KEY=${OMDB_API_KEY} + - SMTP_PASSWORD=${SMTP_PASSWORD} + - SMTP_URL=${SMTP_URL:-postout.lrz.de} + - SMTP_USERNAME=${SMTP_USERNAME:-bot@tum.app} + - SMTP_FROM=${SMTP_FROM:-bot@tum.app} + - SMTP_PORT=${SMTP_PORT:-587} + volumes: + - backend-storage:/Storage + user: 1000:3000 + read_only: true + depends_on: + db: + condition: service_started volumes: backend-storage: