forked from Cognipeer/console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (56 loc) · 1.49 KB
/
docker-compose.yml
File metadata and controls
59 lines (56 loc) · 1.49 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
services:
app:
build: .
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- DB_PROVIDER=sqlite
- MAIN_DB_NAME=console_main
- SQLITE_DATA_DIR=/app/data/sqlite
- JWT_SECRET=${JWT_SECRET:?Set JWT_SECRET in .env.local or environment}
- CACHE_PROVIDER=memory
- RATE_LIMIT_PROVIDER=memory
volumes:
- app-data:/app/data
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/api/health/live"]
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
# ── Optional: MongoDB (uncomment to use MongoDB instead of SQLite) ──
# Requires: DB_PROVIDER=mongodb and MONGODB_URI=mongodb://mongo:27017
#
# mongo:
# image: mongo:7
# ports:
# - "27017:27017"
# volumes:
# - mongo-data:/data/db
# restart: unless-stopped
# healthcheck:
# test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
# interval: 30s
# timeout: 5s
# retries: 3
# ── Optional: Redis (uncomment for redis cache/rate-limiting) ──
# Requires: CACHE_PROVIDER=redis and REDIS_URL=redis://redis:6379
#
# redis:
# image: redis:7-alpine
# ports:
# - "6379:6379"
# volumes:
# - redis-data:/data
# restart: unless-stopped
# healthcheck:
# test: ["CMD", "redis-cli", "ping"]
# interval: 30s
# timeout: 5s
# retries: 3
volumes:
app-data:
# mongo-data:
# redis-data: