This commit is contained in:
2025-11-19 01:32:50 +00:00
parent 7ef7012621
commit efd08e9b25

View File

@@ -2,9 +2,6 @@ services:
litellm: litellm:
image: litellm/litellm:latest image: litellm/litellm:latest
restart: unless-stopped restart: unless-stopped
depends_on:
litellm-db:
condition: service_healthy
volumes: volumes:
- /home/litellm/config.yaml:/app/config.yaml - /home/litellm/config.yaml:/app/config.yaml
command: command:
@@ -42,6 +39,15 @@ services:
- public - public
expose: expose:
- 4000 - 4000
deploy:
replicas: 1
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
placement:
constraints:
- node.role == worker
litellm-db: litellm-db:
image: postgres:17-alpine image: postgres:17-alpine
@@ -52,22 +58,39 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
volumes: volumes:
- /home/litellm/db/data:/var/lib/postgresql/data - litellm-db-data:/var/lib/postgresql/data
networks: networks:
- litellm - litellm
environment: environment:
POSTGRES_DB: ${POSTGRES_DB} POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER} POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
deploy:
replicas: 1
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
placement:
constraints:
- node.hostname == crackbox
volumes: volumes:
litellm-db: litellm-db-data:
name: litellm-db name: litellm-db-data
driver: local
driver_opts:
type: tmpfs
device: tmpfs
networks: networks:
litellm: litellm:
name: litellm
internal: true internal: true
driver: overlay
badge-net: badge-net:
name: badge-net
external: true external: true
public: public:
name: public
external: true external: true