-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (69 loc) · 1.68 KB
/
Copy pathdocker-compose.yml
File metadata and controls
73 lines (69 loc) · 1.68 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
# SpendHound - docker-compose.yml
services:
db:
image: pgvector/pgvector:pg16
container_name: spendhound_db
environment:
POSTGRES_USER: spendhound
POSTGRES_PASSWORD: localdev
POSTGRES_DB: spendhound
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U spendhound -d spendhound"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: development
container_name: spendhound_backend
env_file:
- ./backend/.env
environment:
DATABASE_URL: postgresql+asyncpg://spendhound:localdev@db:5432/spendhound
ports:
- "8000:8000"
volumes:
- ./backend:/app
- ./storage:/app/storage
command: >
sh -c "alembic upgrade head &&
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload"
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: development
container_name: spendhound_frontend
env_file:
- ./frontend/.env
environment:
INTERNAL_API_URL: http://backend:8000
ports:
- "3000:3000"
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
depends_on:
- backend
restart: unless-stopped
volumes:
postgres_data: