add docker

This commit is contained in:
2026-04-07 22:06:27 +03:00
parent 0eb46e4255
commit dc367e2327
10 changed files with 102 additions and 107 deletions

27
docker-compose.yml Normal file
View File

@@ -0,0 +1,27 @@
services:
backend:
build:
context: .
dockerfile: backend/Dockerfile
environment:
OLLAMA_API_URL: "http://10.10.10.136:11434/api/generate"
PORT: "8000"
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health').read()"]
interval: 10s
timeout: 3s
retries: 10
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
environment:
BACKEND_URL: "http://backend:8000/generate"
ports:
- "8501:8501"
depends_on:
backend:
condition: service_healthy