-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (58 loc) · 1.74 KB
/
Copy pathdocker-compose.yml
File metadata and controls
61 lines (58 loc) · 1.74 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
services:
# ── PostgreSQL (GL mirror database) ────────────────────────────────────────
db:
image: postgres:16-alpine
container_name: luca-db
env_file: .env
environment:
POSTGRES_DB: ${POSTGRES_DB:-gl_ledger}
POSTGRES_USER: ${POSTGRES_USER:-gl_admin}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pg_data:/var/lib/postgresql/data
networks:
- luca_network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-gl_admin} -d ${POSTGRES_DB:-gl_ledger}"]
interval: 10s
timeout: 5s
retries: 10
# ── GL API + React frontend ─────────────────────────────────────────────────
api:
build:
context: .
dockerfile: Dockerfile
container_name: luca-api
env_file: .env
environment:
NODE_ENV: production
PORT: 3000
DATABASE_URL: postgresql://${POSTGRES_USER:-gl_admin}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB:-gl_ledger}
CHAIN_DIR: /data/chains
DOCUMENT_STORAGE_DIR: /data/documents
ports:
- "127.0.0.1:3000:3000"
volumes:
- chain_data:/data/chains
- doc_data:/data/documents
- ./logs:/app/logs
networks:
- luca_network
depends_on:
db:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
networks:
luca_network:
driver: bridge
volumes:
pg_data:
chain_data:
doc_data: