Initial commits
This commit is contained in:
40
backend/docker-compose.yml
Normal file
40
backend/docker-compose.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ./.env:/app/.env
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
ollama:
|
||||
condition: service_healthy
|
||||
|
||||
ollama:
|
||||
image: ollama/ollama
|
||||
ports:
|
||||
- "11434:11434"
|
||||
volumes:
|
||||
- ollama_data:/root/.ollama
|
||||
container_name: ollama
|
||||
restart: unless-stopped
|
||||
|
||||
# Override default entrypoint to allow shell command chaining
|
||||
entrypoint: ["/bin/sh", "-c"]
|
||||
command: >
|
||||
"ollama serve &
|
||||
sleep 5 &&
|
||||
until ollama list > /dev/null 2>&1; do sleep 3; done &&
|
||||
ollama pull qwen3:4b &&
|
||||
wait"
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "ollama", "list"]
|
||||
interval: 15s
|
||||
timeout: 10s
|
||||
retries: 6
|
||||
start_period: 120s
|
||||
|
||||
volumes:
|
||||
ollama_data:
|
||||
Reference in New Issue
Block a user