-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
82 lines (81 loc) · 2.08 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
version: "3.1"
services:
watchtower:
image: containrrr/watchtower
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/timezone:/etc/timezone:ro
environment:
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_LABEL_ENABLE=true
- WATCHTOWER_INCLUDE_RESTARTING=true
labels:
- "com.centurylinklabs.watchtower.enable=true"
backend:
build: ./cs-insights-backend
# image: ghcr.io/jpwahle/cs-insights-backend:latest
depends_on:
- mongo
restart: always
env_file: .env
command: npm run cluster
expose:
- 3000
ports:
- 3000:3000
environment:
MONGO_HOST: ${MONGO_HOST}
secrets:
- mongo_user
- mongo_password
labels:
- "com.centurylinklabs.watchtower.enable=true"
mongo:
image: mongo:5.0.9
restart: always
env_file: .env
expose:
- 27017
command: mongod
volumes:
- ~/mongo/data:/data/db
frontend:
build: ./cs-insights-frontend
# image: ghcr.io/jpwahle/cs-insights-frontend:latest
command: nginx -g "daemon off;"
ports:
- 80:80
- 443:443
restart: always
env_file: .env
labels:
- "com.centurylinklabs.watchtower.enable=true"
volumes:
- /etc/letsencrypt/live/cs-insights/privkey.pem:/etc/letsencrypt/live/cs-insights/privkey.pem
- /etc/letsencrypt/live/cs-insights/fullchain.pem:/etc/letsencrypt/live/cs-insights/fullchain.pem
prediction-endpoint:
build: ./cs-insights-prediction-endpoint
# image: ghcr.io/jpwahle/cs-insights-prediction-endpoint:latest
restart: always
env_file: .env
command: poetry run python -m prod --workers 2
secrets:
- mongo_user
- mongo_password
- jwt_secret
expose:
- 8000
ports:
- 8000:8000
labels:
- "com.centurylinklabs.watchtower.enable=true"
volumes:
- ~/prediction-endpoint/saved_models:/cs-insights-prediction-endpoint/saved_models
secrets:
mongo_user:
file: mongo_user.txt
mongo_password:
file: mongo_password.txt
jwt_secret:
file: jwt_secret.txt