Add Ollama status checks and Docker deployment

This commit is contained in:
2026-03-23 14:21:37 -04:00
parent a745c0ca1e
commit 3bc8550f12
11 changed files with 345 additions and 6 deletions

50
docker-compose.yml Normal file
View File

@@ -0,0 +1,50 @@
services:
ollama:
image: ollama/ollama:latest
container_name: monthytracker-ollama
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 15s
timeout: 10s
retries: 20
start_period: 20s
ollama-init:
image: ollama/ollama:latest
depends_on:
ollama:
condition: service_healthy
environment:
OLLAMA_HOST: http://ollama:11434
OLLAMA_MODEL: ${OLLAMA_MODEL:-qwen3.5:9b}
entrypoint: ["/bin/sh", "-c"]
command: "ollama pull ${OLLAMA_MODEL:-qwen3.5:9b}"
volumes:
- ollama_data:/root/.ollama
restart: "no"
app:
build:
context: .
container_name: monthytracker-app
depends_on:
ollama:
condition: service_healthy
ollama-init:
condition: service_completed_successfully
environment:
DATABASE_URL: file:/data/dev.db
OLLAMA_URL: http://ollama:11434/
OLLAMA_MODEL: ${OLLAMA_MODEL:-qwen3.5:9b}
ports:
- "3000:3000"
volumes:
- app_data:/data
volumes:
ollama_data:
app_data: