-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
83 lines (77 loc) · 2.23 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
version: "3.8"
services:
proxy:
image: geometalab/env-configurable-caddy:latest
networks:
- web
- default
environment:
CADDY_CONFIG: |
:8080 {
route {
handle /api/* {
uri strip_prefix /api
reverse_proxy backend:3010
}
redir /api /api/
reverse_proxy /* {
to frontend:80
}
}
}
deploy:
labels:
caddy: cactus.projects-ost.ch
caddy.reverse_proxy: "{{upstreams 8080}}"
restart_policy:
condition: "on-failure"
frontend:
image: $CONTAINER_REGISTRY_PATH/frontend:latest
environment:
- REACT_APP_BACKEND_BASE_URI=https://cactus.projects-ost.ch/api
networks:
- default
deploy:
restart_policy:
condition: "on-failure"
backend:
image: $CONTAINER_REGISTRY_PATH/backend:latest
environment:
- PORT=3010
- DATABASE_URL=mongodb://${DB_USERNAME}:${DB_PASSWORD}@database:27017/cactus
- ACCESS_TOKEN_SECRET=${ACCESS_TOKEN_SECRET}
- FRONTEND_ORIGIN=https://cactus.projects-ost.ch
- GITHUB_OAUTH_CLIENT_ID=${GITHUB_OAUTH_CLIENT_ID}
- GITHUB_OAUTH_CLIENT_SECRET=${GITHUB_OAUTH_CLIENT_SECRET}
- GITHUB_OAUTH_CALLBACK_BASE_URL=https://cactus.projects-ost.ch/api
- GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID}
- GOOGLE_OAUTH_CLIENT_SECRET=${GOOGLE_OAUTH_CLIENT_SECRET}
- GOOGLE_OAUTH_CALLBACK_BASE_URL=https://cactus.projects-ost.ch/api
- SWAGGER_BASE_PATH=/api
networks:
- default
deploy:
restart_policy:
condition: "on-failure"
database:
# *portainer: mongodump --username tester -d cactus --out /backup/
# *portainer: mongodump --username tester -d cactus --archive=/backup/1.archive
image: mongo:6.0.4-focal
networks:
- default
environment:
MONGO_INITDB_ROOT_USERNAME: $DB_USERNAME
MONGO_INITDB_ROOT_PASSWORD: $DB_PASSWORD
volumes:
- cactus-database:/data/db
- cactus-database-backup:/backup
deploy:
restart_policy:
condition: "on-failure"
volumes:
cactus-database: null
cactus-database-backup: null
networks:
web:
external: true
name: web