Files
discord-ollama/docker-compose.yml
T
Eric Curtin 0beaed85aa Document llmman and rename OLLAMA_IP/PORT to LLM_ENDPOINT/PORT (#198)
llmman (https://github.com/llmmanorg/llmman) serves the Ollama API on
port 17434 and works with the bot as-is, so document it in setup-local
and link it from the README. Since the backend is no longer Ollama-only,
rename the env vars to LLM_ENDPOINT / LLM_PORT as requested in review.
OLLAMA_IP / OLLAMA_PORT are kept as deprecated aliases in keys.ts and
docker-compose.yml so existing deployments keep working.
2026-09-10 17:42:42 -07:00

50 lines
1.4 KiB
YAML

# creates the docker compose
# build individual services
services:
# setup discord bot container
discord:
build: ./ # find docker file in designated path
container_name: discord
restart: always # rebuild container always
image: kevinthedang/discord-ollama:0.9.1
environment:
CLIENT_TOKEN: ${CLIENT_TOKEN}
LLM_ENDPOINT: ${LLM_ENDPOINT:-${OLLAMA_IP}} # OLLAMA_IP is a deprecated alias
LLM_PORT: ${LLM_PORT:-${OLLAMA_PORT}} # OLLAMA_PORT is a deprecated alias
MODEL: ${MODEL}
networks:
ollama-net:
ipv4_address: ${DISCORD_IP}
volumes:
- discord:/src/app # docker will not make this for you, make it yourself
# setup ollama container
ollama:
image: ollama/ollama:latest # build the image using ollama
container_name: ollama
restart: always
networks:
ollama-net:
ipv4_address: ${LLM_ENDPOINT:-${OLLAMA_IP}}
runtime: nvidia # use Nvidia Container Toolkit for GPU support
devices:
- /dev/nvidia0
volumes:
- ollama:/root/.ollama
ports:
- ${LLM_PORT:-${OLLAMA_PORT}}:${LLM_PORT:-${OLLAMA_PORT}}
# create a network that supports giving addresses withing a specific subnet
networks:
ollama-net:
driver: bridge
ipam:
driver: default
config:
- subnet: ${SUBNET_ADDRESS}/16
volumes:
ollama:
discord: