-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
85 lines (81 loc) · 1.99 KB
/
compose.yaml
File metadata and controls
85 lines (81 loc) · 1.99 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
83
84
85
services:
postgres:
image: postgres:16
container_name: drydock-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-drydock}
POSTGRES_USER: ${POSTGRES_USER:-drydock}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-drydock}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER:-drydock} -d ${POSTGRES_DB:-drydock}",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
networks:
- drydock
api:
build:
context: ./api
container_name: drydock-api
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
NODE_ENV: development
API_PORT: 3000
DATABASE_URL: postgres://${POSTGRES_USER:-drydock}:${POSTGRES_PASSWORD:-drydock}@postgres:5432/${POSTGRES_DB:-drydock}
ports:
- "${API_PORT:-3000}:3000"
healthcheck:
test:
[
"CMD",
"bun",
"-e",
"fetch('http://127.0.0.1:3000/health').then((response)=>{if(!response.ok)process.exit(1)}).catch(()=>process.exit(1))",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- drydock
web:
build:
context: ./web
args:
NEXT_PUBLIC_API_BASE_URL: http://localhost:3211
NEXT_PUBLIC_WS_URL: ws://localhost:3211/ws
container_name: drydock-web
restart: unless-stopped
ulimits:
nofile:
soft: 65536
hard: 65536
depends_on:
api:
condition: service_healthy
environment:
NODE_ENV: development
API_PROXY_TARGET: http://api:3000
NEXT_PUBLIC_API_BASE_URL: http://localhost:3211
NEXT_PUBLIC_WS_URL: ws://localhost:3211/ws
ports:
- "${WEB_PORT:-3210}:3001"
networks:
- drydock
volumes:
postgres_data:
networks:
drydock: