-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (41 loc) · 1.1 KB
/
docker-compose.yml
File metadata and controls
44 lines (41 loc) · 1.1 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
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: ptdt_postgres
environment:
POSTGRES_USER: ptdt_user
POSTGRES_PASSWORD: ptdt_password
POSTGRES_DB: ptdt_settlement
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ptdt_user"]
interval: 10s
timeout: 5s
retries: 5
api:
build: .
container_name: ptdt_api
environment:
NODE_ENV: production
PORT: 3000
DATABASE_URL: postgresql://ptdt_user:ptdt_password@postgres:5432/ptdt_settlement
BSC_RPC_URL: https://bsc-dataseed1.binance.org:443
PTDT_CONTRACT_ADDRESS: 0x66c6Fc5E7F99272134a52DF9E88D94eD83E89278
JWT_SECRET: ${JWT_SECRET:-development-key-change-in-production}
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
volumes:
postgres_data:
driver: local