forked from Rizsyad/ctf-assistant
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (60 loc) · 1.79 KB
/
docker-compose.yml
File metadata and controls
64 lines (60 loc) · 1.79 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
services:
ctf-assistant:
build:
context: .
dockerfile: Dockerfile
networks:
internal:
traefik:
restart: always
environment:
- MONGO_URI=mongodb://root:example@mongo/
labels:
- "traefik.enable=true"
- "traefik.http.routers.ctf-assistant.rule=Host(`api.assistant.1pc.tf`)"
- "traefik.http.routers.ctf-assistant.entrypoints=websecure"
- "traefik.http.routers.ctf-assistant.service=ctf-assistant"
- "traefik.http.services.ctf-assistant.loadbalancer.server.port=3000"
- "traefik.http.routers.ctf-assistant.tls.certresolver=letsencrypt"
- "traefik.docker.network=traefik"
healthcheck:
test: ["CMD", "sh", "-c", "node -e \"http=require('http');http.get('http://localhost:3000/health',r=>process.exit(r.statusCode==200?0:1)).on('error',()=>process.exit(1))\""]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
ui:
build:
context: .
dockerfile: Dockerfile.ui
args:
NEXT_PUBLIC_API_BASE_URL: https://api.assistant.1pc.tf
networks:
internal:
traefik:
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.ui.rule=Host(`scoring.1pc.tf`)"
- "traefik.http.routers.ui.entrypoints=websecure"
- "traefik.http.routers.ui.service=ui"
- "traefik.http.services.ui.loadbalancer.server.port=3000"
- "traefik.http.routers.ui.tls.certresolver=letsencrypt"
- "traefik.docker.network=traefik"
mongo:
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
restart: always
volumes:
- mongo_data:/data/db
networks:
internal:
networks:
internal:
internal: true
traefik:
external: true
volumes:
mongo_data: