-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
65 lines (60 loc) · 1.56 KB
/
docker-compose.dev.yml
File metadata and controls
65 lines (60 loc) · 1.56 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
version: '3.8'
services:
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- recipe-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
backend:
build:
context: .
dockerfile: Dockerfile.backend
expose:
- "8000"
environment:
- PYTHONPATH=/app
- DATABASE_URL=${DATABASE_URL}
- LOGFIRE_WRITE_TOKEN=${LOGFIRE_WRITE_TOKEN:-}
- LLM_PROVIDER=${LLM_PROVIDER}
- MODEL_NAME=${MODEL_NAME}
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OLLAMA_URL=${OLLAMA_URL:-}
- ALLOW_REGISTRATION=${ALLOW_REGISTRATION:-false}
- ACCESS_TOKEN_EXPIRE_MINUTES=${ACCESS_TOKEN_EXPIRE_MINUTES:-30}
- SECRET_KEY=${SECRET_KEY}
- ALGORITHM=${ALGORITHM:-HS256}
command: uv run uvicorn main:app --host 0.0.0.0 --port 8000 --env-file /app/.env
depends_on:
postgres:
condition: service_healthy
networks:
- recipe-network
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "80:80"
depends_on:
- backend
networks:
- recipe-network
restart: unless-stopped
networks:
recipe-network:
driver: bridge
volumes:
postgres_data: