Files
cloudy/swarm/librechat.yml
T

120 lines
3.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Do not edit this file directly. Use a docker-compose.override.yaml file if you can.
# Refer to `docker-compose.override.yaml.example for some sample configurations.
volumes:
mongodb-data-node:
pgdata2:
libre-images:
libre-logs:
meili_data:
networks:
net:
driver: overlay
attachable: true
traefik-public:
external: true
services:
librechat_api:
depends_on:
- mongodb
- rag_api
image: ghcr.io/danny-avila/librechat-dev:latest
restart: always
user: "${UID}:${GID}"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- HOST=0.0.0.0
- MONGO_URI=mongodb://mongodb:27017/LibreChat
- MEILI_HOST=http://meilisearch:7700
- RAG_PORT=${RAG_PORT:-8000}
- RAG_API_URL=http://rag_api:${RAG_PORT:-8000}
- DOMAIN=${DOMAIN}
volumes:
- type: bind
source: /var/data/config/.env
target: /app/.env
- libre-images:/app/client/public/images
- libre-logs:/app/api/logs
- type: bind
source: /var/data/config/librechat.yaml
target: /app/librechat.yaml
networks:
- net
- traefik-public
deploy:
placement:
constraints:
- node.labels.librechat.libre-images == true
- node.labels.librechat.libre-logs == true
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.constraint-label=traefik-public
- traefik.http.routers.librechat.entrypoints=https
- traefik.http.routers.librechat.rule=Host(`chat.${DOMAIN}`) || Host(`bot.${DOMAIN}`)
- traefik.http.routers.librechat.tls.certresolver=le
- traefik.http.routers.librechat.service=librechat_app
- traefik.http.services.librechat_app.loadbalancer.server.port=${PORT}
mongodb:
image: mongo
restart: always
user: "${UID}:${GID}"
command: mongod --noauth
volumes:
- mongodb-data-node:/data/db
networks:
- net
deploy:
placement:
constraints:
- node.labels.librechat.mongodb-data-node == true
meilisearch:
image: getmeili/meilisearch:v1.7.3
restart: always
user: "${UID}:${GID}"
environment:
- MEILI_HOST=http://meilisearch:7700
- MEILI_NO_ANALYTICS=true
volumes:
- meili_data:/meili_data
networks:
- net
deploy:
placement:
constraints:
- node.labels.librechat.meili_data == true
vectordb:
image: ankane/pgvector:latest
environment:
POSTGRES_DB: mydatabase
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
restart: always
volumes:
- pgdata2:/var/lib/postgresql/data
networks:
- net
deploy:
placement:
constraints:
- node.labels.librechat.pgdata2 == true
rag_api:
image: ghcr.io/danny-avila/librechat-rag-api-dev:latest
environment:
POSTGRES_DB: mydatabase
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
DB_HOST: vectordb
RAG_PORT: ${RAG_PORT:-8000}
restart: always
depends_on:
- vectordb
env_file:
- .env
networks:
- net