-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
100 lines (95 loc) · 2.65 KB
/
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
services:
traefik:
restart: always
image: "traefik:latest"
command:
- --log.level=ERROR
- --providers.docker=true
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --providers.docker.exposedbydefault=false
- --providers.docker.network=web
- --certificatesResolvers.myresolver.acme.storage=/letsencrypt/acme.json
- --certificatesResolvers.myresolver.acme.httpChallenge.entryPoint=web
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- traefik_certificates:/letsencrypt
networks:
- web
backend:
container_name: server
hostname: server
image: ghcr.io/ls1intum/thaii/server:latest
build:
context: .
dockerfile: docker/server/Dockerfile
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=Host(`ma-mang.ase.cit.tum.de`) && PathPrefix(`/api`)"
- "traefik.http.services.backend-service.loadbalancer.server.port=8000"
- "traefik.http.routers.backend.service=backend-service"
- "traefik.http.routers.backend.tls=true"
- "traefik.http.routers.backend.entrypoints=websecure"
- "traefik.http.routers.backend.tls.certresolver=myresolver"
env_file:
- .env
depends_on:
- db
networks:
- web
- backend
expose:
- "8000"
volumes:
- templates:/server/templates
db:
container_name: db
image: postgres:16-alpine
env_file:
- .env
volumes:
- db-data:/var/lib/postgresql/data
networks:
- backend
client:
container_name: client
hostname: client
image: ghcr.io/ls1intum/thaii/client:latest
build:
context: .
dockerfile: docker/client/Dockerfile
args:
VITE_API_URL: "https://ma-mang.ase.cit.tum.de"
labels:
- "traefik.enable=true"
- "traefik.http.routers.client.rule=Host(`ma-mang.ase.cit.tum.de`)"
- "traefik.http.services.client-service.loadbalancer.server.port=3000"
- "traefik.http.routers.client.service=client-service"
- "traefik.http.routers.client.tls=true"
- "traefik.http.routers.client.entrypoints=websecure"
- "traefik.http.routers.client.tls.certresolver=myresolver"
volumes:
- node_modules:/client/node_modules
depends_on:
- backend
networks:
- web
expose:
- "3000"
networks:
web:
external: true
driver: bridge
backend:
external: false
driver: bridge
volumes:
db-data:
node_modules:
templates:
traefik_certificates: