Add Ollama status checks and Docker deployment
This commit is contained in:
50
docker-compose.yml
Normal file
50
docker-compose.yml
Normal 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:
|
||||
Reference in New Issue
Block a user