-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcompose.yaml
More file actions
59 lines (56 loc) · 1.3 KB
/
compose.yaml
File metadata and controls
59 lines (56 loc) · 1.3 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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: sfpulse
POSTGRES_PASSWORD: sfpulse
POSTGRES_DB: sfpulse
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sfpulse -d sfpulse"]
interval: 5s
timeout: 3s
retries: 10
kv:
image: valkey/valkey:8-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
api:
build:
context: .
dockerfile: docker/Dockerfile
depends_on:
db:
condition: service_healthy
kv:
condition: service_healthy
environment:
DATABASE_URL: postgresql://sfpulse:sfpulse@db:5432/sfpulse
REDIS_URL: redis://kv:6379
APP_URL: http://localhost:8000
HOST: 0.0.0.0
PORT: "8000"
env_file:
- path: .env.local
required: false
ports:
- "8000:8000"
volumes:
- ./app:/app/app
- ./workflow:/app/workflow
- ./bin:/app/bin
- ./migrations:/app/migrations
- ./static:/app/static
command: >
sh -c "uv run python -m bin.migrate &&
uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000"
volumes:
db-data: