Skip to content

Commit

Permalink
added another container as I can't get the h1 AND h2 traeffic working…
Browse files Browse the repository at this point in the history
… otherwise
  • Loading branch information
CommanderStorm committed May 13, 2024
1 parent ec9d1a7 commit e0119e2
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:[email protected]}
- SMTP_FROM=${SMTP_FROM:[email protected]}
- SMTP_PORT=${SMTP_PORT:-587}
volumes:
- backend-storage:/Storage
user: 1000:3000
read_only: true
depends_on:
db:
condition: service_started

volumes:
backend-storage:
Expand Down

0 comments on commit e0119e2

Please sign in to comment.