-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (73 loc) · 2.19 KB
/
docker-compose.yml
File metadata and controls
76 lines (73 loc) · 2.19 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
services:
postgres:
image: postgres:15
container_name: sentinelid_postgres
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: password
POSTGRES_DB: sentinelid
ports:
- "5432:5432"
volumes:
- sentinelid_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d sentinelid"]
interval: 5s
timeout: 5s
retries: 5
cloud:
build:
context: ./apps/cloud
container_name: sentinelid_cloud
command: ["./scripts/start_cloud.sh"]
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
environment:
- DATABASE_URL=postgresql://admin:password@postgres/sentinelid
- ADMIN_API_TOKEN=${ADMIN_API_TOKEN:-dev-admin-token}
- CLOUD_BIND_HOST=${CLOUD_BIND_HOST:-0.0.0.0}
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=2)",
]
interval: 5s
timeout: 5s
retries: 5
admin:
build:
context: ./apps/admin
container_name: sentinelid_admin
ports:
- "3000:3000"
depends_on:
cloud:
condition: service_healthy
environment:
- CLOUD_BASE_URL=http://cloud:8000
- ADMIN_API_TOKEN=${ADMIN_API_TOKEN:-dev-admin-token}
- ADMIN_UI_USERNAME=${ADMIN_UI_USERNAME:-admin}
- ADMIN_UI_PASSWORD_HASH_B64=${ADMIN_UI_PASSWORD_HASH_B64:-JDJhJDEyJGJCY1Y5RHMydGNkdXR5QjdneVhMZi5HR3hoZzBGd2d1Lk1uUTdFQWRBcVJxQ1Bxak1SYW51}
- ADMIN_UI_SESSION_SECRET=${ADMIN_UI_SESSION_SECRET:-dev-admin-session-secret-change-me}
- ADMIN_UI_SESSION_TTL_MINUTES=${ADMIN_UI_SESSION_TTL_MINUTES:-480}
- ADMIN_UI_SESSION_SECURE=${ADMIN_UI_SESSION_SECURE:-0}
- NEXT_PUBLIC_DEMO_MODE=${NEXT_PUBLIC_DEMO_MODE:-1}
healthcheck:
test:
[
"CMD",
"node",
"-e",
"const http=require('http');http.get('http://localhost:3000',(r)=>process.exit(r.statusCode===200?0:1)).on('error',()=>process.exit(1));",
]
interval: 5s
timeout: 5s
retries: 5
volumes:
sentinelid_postgres_data: