Add docker-compose configuration for ollama service

This commit is contained in:
2025-11-21 19:17:26 -05:00
parent bbc3be6f1d
commit faa6e0d68a

22
ollama/docker-compose.yml Normal file
View File

@@ -0,0 +1,22 @@
services:
ollama:
image: docker.io/ollama/ollama:latest
ports:
- 7869:11434
volumes:
- /docker-containers/ollama/code:/code
- /docker-containers/ollama/data:/root/.ollama
container_name: ollama
pull_policy: always
tty: true
restart: always
environment:
- OLLAMA_KEEP_ALIVE=24h
- OLLAMA_HOST=0.0.0.0
networks:
- homelab
networks:
homelab:
name: homelab # Networks can also be given a custom name
external: true # This option causes compose to join the above network instead of making a _default one