-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (47 loc) · 1.35 KB
/
docker-compose.yml
File metadata and controls
51 lines (47 loc) · 1.35 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
# version is obsolete in Compose V2; removed to avoid warning
services:
postgres:
image: postgres:16-alpine
ports:
- "5433:5432" # host 5433 to avoid conflict with local Postgres on 5432
environment:
POSTGRES_USER: ${POSTGRES_USER:-privateconnect}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set in .env}
POSTGRES_DB: ${POSTGRES_DB:-privateconnect}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-privateconnect}"]
interval: 5s
timeout: 5s
retries: 5
api:
build:
context: ./apps/api
dockerfile: Dockerfile
ports:
- "3001:3001"
- "23000-23100:23000-23100" # Tunnel ports range
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER:-privateconnect}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-privateconnect}
- PORT=3001
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/v1/agents"]
interval: 10s
timeout: 5s
retries: 3
web:
build:
context: ./apps/web
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NUXT_PUBLIC_API_URL=http://localhost:3001
depends_on:
- api
volumes:
postgres-data: