-
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.03 KB
/
Copy pathdocker-compose.yml
File metadata and controls
44 lines (41 loc) · 1.03 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
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: ${DB_NAME:-folio}
POSTGRES_USER: ${DB_USER:-folio}
POSTGRES_PASSWORD: ${DB_PASS:-folio}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-folio} -d ${DB_NAME:-folio}"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
backend:
build: ./backend
ports:
- "${PORT:-3000}:3000"
environment:
NODE_ENV: development
DB_HOST: postgres
DB_PORT: ${DB_PORT:-5432}
DB_NAME: ${DB_NAME:-folio}
DB_USER: ${DB_USER:-folio}
DB_PASS: ${DB_PASS:-folio}
PORT: ${PORT:-3000}
FRONTEND_URL: ${FRONTEND_URL:-http://localhost:5173}
depends_on:
postgres:
condition: service_healthy
frontend:
build: ./frontend
ports:
- "5173:5173"
environment:
VITE_API_URL: ${VITE_API_URL:-http://localhost:3000}
depends_on:
- backend
volumes:
postgres_data: