-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
84 lines (81 loc) · 2.88 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
services:
db:
container_name: cloudsql-proxy
image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.14.2
restart: unless-stopped
command: tum-app-422909:europe-west1:tum-app-backend --credentials-file=/secrets/cloudsql/credentials.json --address 0.0.0.0 --port ${DB_PORT:-3306}
networks:
- traefik_traefik
expose:
- "${DB_PORT:-3306}"
volumes:
- /root/credentials/backend-gcp-cloudsql-credentials.json:/secrets/cloudsql/credentials.json
backend_h1:
image: ghcr.io/tum-dev/campus-backend/backend-server:main
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.entrypoints=webs"
- "traefik.http.routers.backend.tls.certresolver=leacme"
- "traefik.http.routers.backend.rule=Host(`api.tum.app`)"
- "traefik.http.services.backend.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
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(`api.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:
driver: local
networks:
traefik_traefik:
external: true