-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
85 lines (82 loc) · 2.83 KB
/
docker-compose.prod.yml
File metadata and controls
85 lines (82 loc) · 2.83 KB
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
version: '3.9'
services:
reverse-proxy:
image: traefik:v2.10
command:
# Docker configuration
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
# Configure entrypoint
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
# Global HTTP -> HTTPS
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
# SSL configuration
- "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.letsencrypt.acme.email=benedikt.geisberger@tum.de"
- "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
# Enable dashboard
- "--api.dashboard=true"
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./letsencrypt:/letsencrypt
mongodb:
container_name: mongodb
image: mongo:latest
restart: on-failure
environment:
- MONGO_INITDB_ROOT_USERNAME=$MONGODB_USER
- MONGO_INITDB_ROOT_PASSWORD=$MONGODB_PASSWORD
volumes:
- ./mongo-data:/data/db
uicompanion-server:
container_name: uicompanion-server
depends_on:
- mongodb
- reverse-proxy
image: ghcr.io/ls1intum/uicompanion/uicompanion-server:${SERVER_IMAGE_TAG}
restart: on-failure
environment:
- MONGODB_USER=$MONGODB_USER
- MONGODB_PASSWORD=$MONGODB_PASSWORD
- MONGODB_DATABASE=$MONGODB_DATABASE
- MONGODB_HOST=mongodb
- MONGODB_PORT=27017
labels:
- "traefik.enable=true"
- "traefik.http.routers.server.rule=Host(`${HOST_ALIAS}`) && PathPrefix(`/api`)"
- "traefik.http.services.server.loadbalancer.server.port=3001"
- "traefik.http.routers.server.entrypoints=websecure"
- "traefik.http.routers.server.tls.certresolver=letsencrypt"
expose:
- 3001
uicompanion-app:
container_name: uicompanion-app
depends_on:
- uicompanion-server
- reverse-proxy
image: ghcr.io/ls1intum/uicompanion/uicompanion-app:${APP_IMAGE_TAG}
restart: on-failure
environment:
- LOG_LEVEL_IN_STRING=$LOG_LEVEL_IN_STRING
- NODE_ENV=production
- WEBHOOK_URL=$WEBHOOK_URL
- APP_ID=$APP_ID
- PRIVATE_KEY=$PRIVATE_KEY
- WEBHOOK_SECRET=$WEBHOOK_SECRET
- GH_CLIENT_ID=$GH_CLIENT_ID
- GH_CLIENT_SECRET=$GH_CLIENT_SECRET
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=Host(`${HOST_ALIAS}`)"
- "traefik.http.services.app.loadbalancer.server.port=3000"
- "traefik.http.routers.app.entrypoints=websecure"
- "traefik.http.routers.app.tls.certresolver=letsencrypt"
expose:
- 3000