-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (61 loc) · 1.42 KB
/
docker-compose.yml
File metadata and controls
64 lines (61 loc) · 1.42 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
services:
web:
image: node:22-alpine
working_dir: /app
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
env_file:
- path: .env
required: false
environment:
- VITE_API_PROXY_TARGET=http://api:8000
command: sh -c "npm install && npm run dev"
depends_on:
- api
restart: unless-stopped
api:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
volumes:
- ./backend/src:/app/src
- ./backend/alembic:/app/alembic
env_file:
- path: .env
required: false
environment:
- POSTGRES_USER=budge
- POSTGRES_PASSWORD=budge
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=budge
- DEBUG=false
command: uv run uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload
depends_on:
db:
condition: service_healthy
restart: unless-stopped
db:
image: postgres:18
environment:
- POSTGRES_USER=budge
- POSTGRES_PASSWORD=budge
- POSTGRES_DB=budge
ports:
- "5432:5432" # DEVELOPMENT ONLY: Remove in production
volumes:
- postgres_data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U budge -d budge"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
postgres_data:
frontend_node_modules: