-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
75 lines (70 loc) · 1.7 KB
/
docker-compose.dev.yml
File metadata and controls
75 lines (70 loc) · 1.7 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
version: '3.8'
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
volumes:
- ./frontend:/workspace
- /workspace/node_modules
environment:
- REACT_APP_API_URL=http://localhost:8000
depends_on:
- backend
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
ports:
- "8000:8000"
volumes:
- ./backend:/app
environment:
- PYTHONPATH=/app
- DATABASE_TYPE=postgres
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=emptymug
- POSTGRES_PASSWORD=emptymug_password
- POSTGRES_DB=emptymug
- OLLAMA_HOST=http://ollama:11434
- OLLAMA_MODEL=llama2
- CORS_ORIGINS=http://localhost:3000
depends_on:
- postgres
- ollama
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_USER=emptymug
- POSTGRES_PASSWORD=emptymug_password
- POSTGRES_DB=emptymug
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend/database/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U emptymug"]
interval: 10s
timeout: 5s
retries: 5
ollama:
image: ollama/ollama:latest
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
environment:
- OLLAMA_HOST=0.0.0.0
command: sh -c "ollama serve & sleep 10 && ollama pull llama2 && wait"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
interval: 30s
timeout: 10s
retries: 5
volumes:
postgres_data:
ollama_data: