feat(service): add librechat template (#5654)
This commit is contained in:
committed by
GitHub
parent
1d4a19fb61
commit
03040d6bc8
32
public/svgs/librechat.svg
Normal file
32
public/svgs/librechat.svg
Normal file
@@ -0,0 +1,32 @@
|
||||
<svg width="512" height="512" version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<linearGradient id="linearGradient22708">
|
||||
<stop stop-color="#21facf" offset="0"/>
|
||||
<stop stop-color="#0970ef" offset="1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient6949" x1="68.454" x2="198.59" y1="246.73" y2="96.35" gradientTransform="translate(-5.754,-56.594)" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#72004e" offset="0"/>
|
||||
<stop stop-color="#0015b1" offset="1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient22718" x1="56.735" x2="155.2" y1="246.96" y2="58.575" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#4f00da" offset="0"/>
|
||||
<stop stop-color="#e5311b" offset="1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient23463" x1="68.454" x2="198.59" y1="246.73" y2="96.35" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient22708"/>
|
||||
<linearGradient id="linearGradient903" x1="54.478" x2="192.1" y1="247.56" y2="9.8095" gradientTransform="matrix(.87923 0 0 .87923 -9.551 48.787)" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#dc180d" offset="0"/>
|
||||
<stop stop-color="#f96e20" offset=".5"/>
|
||||
<stop stop-color="#f4ce41" offset="1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient918" x1="39.468" x2="154.99" y1="204.22" y2="124.47" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient22708"/>
|
||||
</defs>
|
||||
<g transform="matrix(2.473 0 0 2.473 -4.8978 -4.8812)">
|
||||
<path transform="translate(-5.5496,-57.412)" d="m148.16 59.393c-7.7098 9.3985-19.951 42.888-20.696 49.204-0.16994 4.6737 1.3731 14.231 0.67182 15.805-0.71909 1.6134-5.117-9.4461-7.2151-6.3266-12.219 18.168-10.7 17.731-15.582 31.378-1.8357 5.1315-0.42447 21.99-1.5666 23.773-1.273 1.9866-3.962-12.31-6.8063-9.236-11.603 12.54-16.279 20.379-22.336 30.607-3.3589 5.6725-2.1817 23.33-3.506 24.674-1.3023 1.3215-3.8566-18.326-7.6437-14.309-8.5193 9.038-14.054 13.441-18.946 19.252-5.1981 6.1739-0.78251 17.584-5.0672 35.383l0.1448 0.22073c77.447-50.308 101.52-127.16 107.61-181.19-0.68051 63.93-29.41 142.78-105.33 184.65l0.1127 0.17141c20.241-2.181 22.307 10.458 44.562-4.2837 55.792-48.277 81.856-124.29 61.593-199.78z" display="none" fill="url(#linearGradient903)"/>
|
||||
<path transform="translate(-5.5498,-57.412)" d="m148.16 59.393c-7.7098 9.3985-19.951 42.888-20.696 49.204-0.16994 4.6737 1.3731 14.231 0.67182 15.805-0.71909 1.6134-5.117-9.4461-7.2151-6.3266-12.219 18.168-10.7 17.731-15.582 31.378-1.8357 5.1315-0.42447 21.99-1.5666 23.773-1.273 1.9866-3.962-12.31-6.8063-9.236-11.603 12.54-16.279 20.379-22.336 30.607-3.3589 5.6725-2.1817 23.33-3.506 24.674-1.3023 1.3215-3.8566-18.326-7.6437-14.309-8.5193 9.038-14.054 13.441-18.946 19.252-5.1981 6.1739-0.78251 17.584-5.0672 35.383l0.1448 0.22073c77.447-50.308 101.52-127.16 107.61-181.19-0.68051 63.93-29.41 142.78-105.33 184.65l0.1127 0.17141c20.241-2.181 22.307 10.458 44.562-4.2837 55.792-48.277 81.856-124.29 61.593-199.78z" fill="url(#linearGradient918)"/>
|
||||
<g transform="translate(0 2.0218e-5)">
|
||||
<path transform="translate(-5.7543,-56.594)" d="m111.25 81.024c-48.394-1.5e-5 -87.625 39.231-87.625 87.625 0.0174 20.443 7.1818 40.236 20.253 55.954 0.2523-0.42224 0.53629-0.82423 0.85783-1.2061 4.892-5.8104 10.427-10.214 18.946-19.252 3.7871-4.0176 6.3412 15.63 7.6435 14.309 1.3243-1.3439 0.1473-19.001 3.5062-24.674 6.0563-10.228 10.733-18.067 22.336-30.607 2.8443-3.0741 5.5333 11.223 6.8063 9.2361 1.1421-1.7823-0.26941-18.641 1.5663-23.773 4.8819-13.647 3.3631-13.21 15.582-31.378 2.098-3.1195 6.496 7.9402 7.2151 6.3268 0.70126-1.5734-0.84173-11.131-0.67179-15.805 0.37161-3.1498 3.6036-13.059 7.7055-23.367-7.8432-2.2472-15.962-3.3881-24.12-3.3895zm43.142 11.356c5.5662 61.595-18.426 120.7-62.796 161.65 6.446 1.4857 13.04 2.2367 19.655 2.2386 48.394 1e-5 87.625-39.231 87.625-87.625-3.1e-4 -31.581-16.995-60.719-44.484-76.268z" display="none" fill="url(#linearGradient22718)"/>
|
||||
<path transform="translate(-5.754,-56.594)" d="m111.25 81.024c-48.394-1.5e-5 -87.625 39.231-87.625 87.625 0.0174 20.443 7.1818 40.236 20.253 55.954 0.2523-0.42224 0.53629-0.82423 0.85783-1.2061 4.892-5.8104 10.427-10.214 18.946-19.252 3.7871-4.0176 6.3412 15.63 7.6435 14.309 1.3243-1.3439 0.1473-19.001 3.5062-24.674 6.0563-10.228 10.733-18.067 22.336-30.607 2.8443-3.0741 5.5333 11.223 6.8063 9.2361 1.1421-1.7823-0.26941-18.641 1.5663-23.773 4.8819-13.647 3.3631-13.21 15.582-31.378 2.098-3.1195 6.496 7.9402 7.2151 6.3268 0.70126-1.5734-0.84173-11.131-0.67179-15.805 0.37161-3.1498 3.6036-13.059 7.7055-23.367-7.8432-2.2472-15.962-3.3881-24.12-3.3895zm43.142 11.356c5.5662 61.595-18.426 120.7-62.796 161.65 6.446 1.4857 13.04 2.2367 19.655 2.2386 48.394 1e-5 87.625-39.231 87.625-87.625-3.1e-4 -31.581-16.995-60.719-44.484-76.268z" display="none" fill="url(#linearGradient23463)"/>
|
||||
<path d="m105.5 24.43c-48.394-1.5e-5 -87.625 39.231-87.625 87.625 0.0174 20.443 7.1818 40.236 20.253 55.954 0.2523-0.42224 0.53629-0.82423 0.85783-1.2061 4.892-5.8104 10.427-10.214 18.946-19.252 3.7871-4.0176 6.3412 15.63 7.6435 14.309 1.3243-1.3439 0.1473-19.001 3.5062-24.674 6.0563-10.228 10.733-18.067 22.336-30.607 2.8443-3.0741 5.5333 11.223 6.8063 9.2361 1.1421-1.7823-0.26941-18.641 1.5663-23.773 4.8819-13.647 3.3631-13.21 15.582-31.378 2.098-3.1195 6.496 7.9402 7.2151 6.3268 0.70126-1.5734-0.84173-11.131-0.67179-15.805 0.37161-3.1498 3.6036-13.059 7.7055-23.367-7.8432-2.2472-15.962-3.3881-24.12-3.3895zm43.142 11.356c5.5662 61.595-18.426 120.7-62.796 161.65 6.446 1.4857 13.04 2.2367 19.655 2.2386 48.394 1e-5 87.625-39.231 87.625-87.625-3.1e-4 -31.581-16.995-60.719-44.484-76.268z" fill="url(#linearGradient6949)"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.6 KiB |
157
templates/compose/librechat.yaml
Normal file
157
templates/compose/librechat.yaml
Normal file
@@ -0,0 +1,157 @@
|
||||
# documentation: https://docs.librechat.ai/install/configuration/dotenv.html
|
||||
# slogan: Self-hosted, powerful, and privacy-focused chat UI for multiple AI models
|
||||
# tags: ai,chat,gpt,claude,palm,openai,azure,huggingface,anthropic,ollama,llm
|
||||
# logo: svgs/librechat.svg
|
||||
# port: 3080
|
||||
|
||||
services:
|
||||
librechat:
|
||||
image: ghcr.io/danny-avila/librechat-dev-api:latest
|
||||
depends_on:
|
||||
mongodb:
|
||||
condition: service_healthy
|
||||
rag_api:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- HOST=0.0.0.0
|
||||
- PORT=3080
|
||||
- SERVICE_FQDN_LIBRECHAT_3080
|
||||
# MongoDB settings
|
||||
- MONGO_URI=mongodb://${SERVICE_USER_MONGO}:${SERVICE_PASSWORD_MONGO}@mongodb:27017/librechat?authSource=admin
|
||||
# Meilisearch settings
|
||||
- MEILI_HOST=http://meilisearch:7700
|
||||
- MEILI_MASTER_KEY=${SERVICE_PASSWORD_MEILI}
|
||||
# RAG settings
|
||||
- RAG_PORT=8000
|
||||
- RAG_API_URL=http://rag_api:8000
|
||||
# Auth settings
|
||||
- DOMAIN_CLIENT=${SERVICE_FQDN_LIBRECHAT}
|
||||
- DOMAIN_SERVER=${SERVICE_FQDN_LIBRECHAT}
|
||||
- JWT_SECRET=${SERVICE_PASSWORD_JWT}
|
||||
- JWT_REFRESH_SECRET=${SERVICE_PASSWORD_64_JWT}
|
||||
# App settings
|
||||
- APP_TITLE=${APP_TITLE:-LibreChat}
|
||||
- ALLOW_EMAIL_LOGIN=${ALLOW_EMAIL_LOGIN:-true}
|
||||
- ALLOW_REGISTRATION=${ALLOW_REGISTRATION:-true}
|
||||
- ALLOW_SOCIAL_LOGIN=${ALLOW_SOCIAL_LOGIN:-false}
|
||||
- ALLOW_SOCIAL_REGISTRATION=${ALLOW_SOCIAL_REGISTRATION:-false}
|
||||
- ALLOW_PASSWORD_RESET=${ALLOW_PASSWORD_RESET:-false}
|
||||
- ALLOW_UNVERIFIED_EMAIL_LOGIN=${ALLOW_UNVERIFIED_EMAIL_LOGIN:-true}
|
||||
# Encryption settings
|
||||
- CREDS_KEY=${SERVICE_PASSWORD_64_CREDS}
|
||||
- CREDS_IV=${SERVICE_PASSWORD_CREDS}
|
||||
# API Keys
|
||||
- ANTHROPIC_API_KEY=${SERVICE_ANTHROPIC_API_KEY:-user_provided}
|
||||
- GOOGLE_KEY=${SERVICE_GOOGLE_API_KEY:-user_provided}
|
||||
- OPENAI_API_KEY=${SERVICE_OPENAI_API_KEY:-user_provided}
|
||||
- ASSISTANTS_API_KEY=${SERVICE_ASSISTANTS_API_KEY:-user_provided}
|
||||
# Debug settings
|
||||
- DEBUG_LOGGING=${DEBUG_LOGGING:-false}
|
||||
- DEBUG_OPENAI=${DEBUG_OPENAI:-false}
|
||||
- DEBUG_PLUGINS=${DEBUG_OPENAI:-false}
|
||||
- NO_INDEX=${NO_INDEX:-true}
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
'CMD',
|
||||
'wget',
|
||||
'--no-verbose',
|
||||
'--tries=1',
|
||||
'--spider',
|
||||
'http://127.0.0.1:3080/api/health',
|
||||
]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
volumes:
|
||||
- librechat-images:/app/client/public/images
|
||||
- librechat-logs:/app/api/logs
|
||||
- librechat-uploads:/app/uploads
|
||||
- type: bind
|
||||
source: ./librechat.yaml
|
||||
target: /app/librechat.yaml
|
||||
content: |
|
||||
# For more information, see the Configuration Guide:
|
||||
# https://www.librechat.ai/docs/configuration/librechat_yaml
|
||||
|
||||
# Configuration version (required)
|
||||
version: 1.2.8
|
||||
|
||||
mongodb:
|
||||
environment:
|
||||
- MONGO_INITDB_ROOT_USERNAME=${SERVICE_USER_MONGO}
|
||||
- MONGO_INITDB_ROOT_PASSWORD=${SERVICE_PASSWORD_MONGO}
|
||||
image: mongo:8
|
||||
volumes:
|
||||
- mongodb-data:/data/db
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
'CMD',
|
||||
'mongosh',
|
||||
'--eval',
|
||||
"db.runCommand('ping').ok",
|
||||
'127.0.0.1:27017/test',
|
||||
'--quiet',
|
||||
]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
meilisearch:
|
||||
image: getmeili/meilisearch:v1.12.3
|
||||
environment:
|
||||
- MEILI_MASTER_KEY=${SERVICE_PASSWORD_MEILI}
|
||||
- MEILI_NO_ANALYTICS=${MEILI_NO_ANALYTICS:-false}
|
||||
- MEILI_ENV=production
|
||||
- MEILI_HOST=http://meilisearch:7700
|
||||
volumes:
|
||||
- meilisearch-data:/meili_data
|
||||
healthcheck:
|
||||
test: ['CMD', 'curl', '-f', 'http://127.0.0.1:7700/health']
|
||||
interval: 2s
|
||||
timeout: 10s
|
||||
retries: 15
|
||||
|
||||
vectordb:
|
||||
image: ankane/pgvector:latest
|
||||
environment:
|
||||
- POSTGRES_DB=rag
|
||||
- POSTGRES_USER=${SERVICE_USER_POSTGRES}
|
||||
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
|
||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||
volumes:
|
||||
- vectordb-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- pg_isready
|
||||
- '--username=$SERVICE_USER_POSTGRES'
|
||||
- '--host=127.0.0.1'
|
||||
- '--port=5432'
|
||||
- '--dbname=rag'
|
||||
interval: 2s
|
||||
timeout: 1m
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
rag_api:
|
||||
image: ghcr.io/danny-avila/librechat-rag-api-dev-lite:latest
|
||||
depends_on:
|
||||
vectordb:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- POSTGRES_DB=rag
|
||||
- POSTGRES_USER=${SERVICE_USER_POSTGRES}
|
||||
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
|
||||
- DB_HOST=vectordb
|
||||
- DB_USER=${SERVICE_USER_POSTGRES}
|
||||
- DB_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
|
||||
- DB_NAME=rag
|
||||
- RAG_PORT=8000
|
||||
- RAG_OPENAI_API_KEY=${SERVICE_OPENAI_API_KEY:-user_provided}
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health')"]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
Reference in New Issue
Block a user