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