git
This commit is contained in:
219
deploy-compose.swarm.yml
Normal file
219
deploy-compose.swarm.yml
Normal file
@@ -0,0 +1,219 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
api:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: Dockerfile.multi
|
||||
# target: api-build
|
||||
image: ghcr.io/danny-avila/librechat-dev-api:latest
|
||||
# ports:
|
||||
# - 3080:3080
|
||||
depends_on:
|
||||
- mongodb
|
||||
- rag_api
|
||||
networks:
|
||||
- net
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
env_file:
|
||||
- stack.env
|
||||
environment:
|
||||
- HOST=0.0.0.0
|
||||
- NODE_ENV=production
|
||||
- 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}
|
||||
volumes:
|
||||
- type: bind
|
||||
source: /home/trav/apps/LibreChat/librechat.yaml
|
||||
target: /app/librechat.yaml
|
||||
- /home/trav/apps/LibreChat/images:/app/client/public/images
|
||||
- /home/trav/apps/LibreChat/uploads:/app/uploads
|
||||
- /home/trav/apps/LibreChat/logs:/app/api/logs
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 15s
|
||||
max_attempts: 10
|
||||
window: 2m
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 15s
|
||||
failure_action: rollback
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname == little
|
||||
|
||||
client:
|
||||
image: nginx:1.27.0-alpine
|
||||
# ports:
|
||||
# - 80:80
|
||||
# - 443:443
|
||||
depends_on:
|
||||
- api
|
||||
networks:
|
||||
- net
|
||||
- badge-net
|
||||
volumes:
|
||||
- /home/trav/apps/LibreChat/client/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 15s
|
||||
max_attempts: 10
|
||||
window: 2m
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 15s
|
||||
failure_action: rollback
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname == little
|
||||
|
||||
mongodb:
|
||||
# ports: # Uncomment this to access mongodb from outside docker, not safe in deployment
|
||||
# - 27018:27017
|
||||
image: mongo
|
||||
networks:
|
||||
- net
|
||||
volumes:
|
||||
- librechat-mongodb:/data/db
|
||||
command: mongod --noauth
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 20s
|
||||
max_attempts: 15
|
||||
window: 3m
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 20s
|
||||
failure_action: rollback
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname == little
|
||||
|
||||
meilisearch:
|
||||
image: getmeili/meilisearch:v1.12.3
|
||||
networks:
|
||||
- net
|
||||
# ports: # Uncomment this to access meilisearch from outside docker
|
||||
# - 7700:7700 # if exposing these ports, make sure your master key is not the default value
|
||||
env_file:
|
||||
- stack.env
|
||||
environment:
|
||||
- MEILI_HOST=http://meilisearch:7700
|
||||
- MEILI_NO_ANALYTICS=true
|
||||
volumes:
|
||||
- librechat-meili_data:/meili_data
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 20s
|
||||
max_attempts: 15
|
||||
window: 3m
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 20s
|
||||
failure_action: rollback
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname == little
|
||||
|
||||
vectordb:
|
||||
image: pgvector/pgvector:0.8.0-pg15-trixie
|
||||
environment:
|
||||
POSTGRES_DB: mydatabase
|
||||
POSTGRES_USER: myuser
|
||||
POSTGRES_PASSWORD: mypassword
|
||||
networks:
|
||||
- net
|
||||
volumes:
|
||||
- librechat-pgdata:/var/lib/postgresql/data
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 20s
|
||||
max_attempts: 15
|
||||
window: 3m
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 20s
|
||||
failure_action: rollback
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname == little
|
||||
|
||||
rag_api:
|
||||
image: ghcr.io/danny-avila/librechat-rag-api-dev-lite:latest
|
||||
environment:
|
||||
- DB_HOST=vectordb
|
||||
- RAG_PORT=${RAG_PORT:-8000}
|
||||
networks:
|
||||
- net
|
||||
# depends_on:
|
||||
# - vectordb
|
||||
env_file:
|
||||
- stack.env
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 20s
|
||||
max_attempts: 15
|
||||
window: 3m
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 20s
|
||||
failure_action: rollback
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname == little
|
||||
|
||||
metrics:
|
||||
image: ghcr.io/virtuos/librechat_exporter:main
|
||||
# depends_on:
|
||||
# - mongodb
|
||||
# ports:
|
||||
# - "8000:8000"
|
||||
networks:
|
||||
- net
|
||||
- observability_observability
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 15s
|
||||
max_attempts: 10
|
||||
window: 2m
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 15s
|
||||
failure_action: rollback
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname == little
|
||||
|
||||
volumes:
|
||||
librechat-pgdata:
|
||||
name: librechat-pgdata
|
||||
librechat-mongodb:
|
||||
name: librechat-mongodb
|
||||
librechat-meili_data:
|
||||
name: librechat-meili_data
|
||||
|
||||
networks:
|
||||
net:
|
||||
driver: overlay
|
||||
attachable: true
|
||||
badge-net:
|
||||
external: true
|
||||
observability_observability:
|
||||
external: true
|
||||
Reference in New Issue
Block a user