forked from Predictify-org/predictify-backend
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (52 loc) · 1.37 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (52 loc) · 1.37 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
services:
db:
image: postgres:16-alpine
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: predictify
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d predictify"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
migrate:
build: .
environment:
- DATABASE_URL=postgres://postgres:postgres@db:5432/predictify
depends_on:
db:
condition: service_healthy
command: npm run db:migrate
api:
build: .
restart: unless-stopped
ports:
- "3001:3001"
environment:
- DATABASE_URL=postgres://postgres:postgres@db:5432/predictify
- NODE_ENV=production
depends_on:
migrate:
condition: service_completed_successfully
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3001/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
indexer:
build: .
restart: unless-stopped
environment:
- DATABASE_URL=postgres://postgres:postgres@db:5432/predictify
- NODE_ENV=production
depends_on:
migrate:
condition: service_completed_successfully
# Assuming standard indexer start; adjust if indexer has a specific entry point file
command: npm run indexer:gap-scan
volumes:
postgres_data: