add docker
This commit is contained in:
27
docker-compose.yml
Normal file
27
docker-compose.yml
Normal 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
|
||||
Reference in New Issue
Block a user