Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
74 lines (69 loc) · 1.69 KB
/
Copy pathdocker-compose.dev.yaml
File metadata and controls
74 lines (69 loc) · 1.69 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
# Local dev compose for machines without an NVIDIA GPU.
# Runs db, api, and frontend only — Ollama runs natively on the host.
#
# Prerequisites (one-time):
# brew install ollama
# ollama pull smollm:135m
# ollama pull nomic-embed-text:latest
#
# Usage (two terminals):
# Terminal 1: ollama serve
# Terminal 2: docker compose -f docker-compose.dev.yaml up
services:
db:
build:
context: ./DB
restart: unless-stopped
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- backend
api:
build:
context: ./BackendAPI
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
DB_CONN: ${DB_CONN:-}
DB_PASSWORD: ${DB_PASSWORD}
OLLAMA_CONN: ${OLLAMA_CONN:-http://host.docker.internal:11434}
ANSWER_MODEL: ${ANSWER_MODEL:-smollm:135m}
EMBED_MODEL: ${EMBED_MODEL:-nomic-embed-text:latest}
CHATBOT_LIMIT_STRAT: ${CHATBOT_LIMIT_STRAT:-IP}
CHATBOT_LIMIT: ${CHATBOT_LIMIT:-5/minute}
PYTHONPATH: /app
ports:
- "8000:8000"
depends_on:
- db
networks:
- backend
develop:
watch:
- action: sync
path: ./BackendAPI/src
target: /app/src
initial_sync: true
- action: rebuild
path: ./BackendAPI/requirements.txt
target: /app/requirements.txt
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_BASE_PATH: ${VITE_BASE_PATH:-/}
restart: unless-stopped
ports:
- "80:80"
depends_on:
- api
networks:
- backend
volumes:
pgdata:
networks:
backend: