Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (77 loc) · 2.01 KB
/
Copy pathdocker-compose.yml
File metadata and controls
81 lines (77 loc) · 2.01 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
74
75
76
77
78
79
80
81
services:
db:
image: postgres:17-alpine
container_name: stepscribe-db
environment:
POSTGRES_USER: ${POSTGRES_USER:-stepscribe}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-stepscribe}
POSTGRES_DB: ${POSTGRES_DB:-stepscribe}
ports:
- "${DB_PORT:-5432}:5432"
volumes:
- stepscribe-pgdata:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-stepscribe}"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: stepscribe-backend
env_file: .env
ports:
- "${BACKEND_PORT:-8100}:8000"
volumes:
# Persistent data for uploads and exports
- ./data/exports:/app/data/exports
- ./data/uploads:/app/data/uploads
depends_on:
db:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
# If using Ollama on the host machine
extra_hosts:
- "host.docker.internal:host-gateway"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_API_URL=http://localhost:${BACKEND_PORT:-8100}
- NEXT_PUBLIC_APP_NAME=StepScribe
container_name: stepscribe-frontend
env_file: .env
ports:
- "${FRONTEND_PORT:-3100}:3000"
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
# Optional: Run Ollama locally inside Docker
# Start with: docker compose --profile ollama up -d
ollama:
image: ollama/ollama:latest
container_name: stepscribe-ollama
profiles: ["ollama"]
ports:
- "11434:11434"
volumes:
- ollama-data:/root/.ollama
restart: unless-stopped
deploy:
resources:
reservations:
memory: 4G
volumes:
stepscribe-pgdata:
driver: local
ollama-data:
driver: local