-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·82 lines (77 loc) · 2.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
executable file
·82 lines (77 loc) · 2.34 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
77
78
79
80
81
82
version: '3.8'
services:
# ─── PostgreSQL Database ───────────────────────────────────
postgres:
container_name: biowallet-postgres
image: postgres:16-alpine
ports:
- "5432:5432"
env_file:
- ./backend/api/.env
environment:
POSTGRES_USER: ${POSTGRES_USER:-biowallet}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-biowallet}
POSTGRES_DB: ${POSTGRES_DB:-biowallet}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-biowallet} -d ${POSTGRES_DB:-biowallet}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
networks:
- biowallet-network
# ─── Express Backend API ──────────────────────────────────
backend:
container_name: biowallet-backend
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "3001:3001"
env_file:
- ./backend/api/.env
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-biowallet}:${POSTGRES_PASSWORD:-biowallet}@postgres:5432/${POSTGRES_DB:-biowallet}
NODE_ENV: production
PORT: 3001
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:3001/health || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
networks:
- biowallet-network
# ─── Next.js Web App ──────────────────────────────────────
web:
container_name: biowallet-web
build:
context: .
dockerfile: apps/web/Dockerfile
ports:
- "3000:3000"
env_file:
- ./apps/web/.env.local
environment:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:3001/api}
NEXT_PUBLIC_RPC_URL: ${NEXT_PUBLIC_RPC_URL:-https://rpc.ankr.com/eth_sepolia}
NODE_ENV: production
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
networks:
- biowallet-network
networks:
biowallet-network:
driver: bridge
volumes:
postgres-data:
driver: local