diff --git a/compose/swarm/docker-compose.litellm.yml b/compose/swarm/docker-compose.litellm.yml index 0364c34..c30edd2 100644 --- a/compose/swarm/docker-compose.litellm.yml +++ b/compose/swarm/docker-compose.litellm.yml @@ -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 \ No newline at end of file