-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.26 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (53 loc) · 1.26 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
services:
postgres:
image: postgres:16-alpine
container_name: fintracker_postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "${DB_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
container_name: fintracker_backend
restart: unless-stopped
env_file: .env
environment:
DB_HOST: postgres
DB_PORT: 5432
ports:
- "${BACKEND_PORT:-8080}:8080"
volumes:
- ./backend:/app
depends_on:
postgres:
condition: service_healthy
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: fintracker_frontend
restart: unless-stopped
env_file: .env
ports:
- "${FRONTEND_PORT:-5173}:5173"
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- backend
volumes:
postgres_data:
name: fintracker_postgres_data