From a5df6d4d3c8564979a8af70fd1a2789384708fbc Mon Sep 17 00:00:00 2001 From: jeremy Date: Tue, 23 Jun 2026 22:13:23 -0500 Subject: [PATCH] feat: add PostgreSQL to LiteLLM for UI auth support Co-Authored-By: Claude Sonnet 4.6 --- .../hf-pdocker-01/litellm/docker-compose.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/compose/hf-pdocker-01/litellm/docker-compose.yml b/compose/hf-pdocker-01/litellm/docker-compose.yml index f156f01..8451968 100644 --- a/compose/hf-pdocker-01/litellm/docker-compose.yml +++ b/compose/hf-pdocker-01/litellm/docker-compose.yml @@ -13,6 +13,9 @@ services: labels: - "com.centurylinklabs.watchtower.enable=false" mem_limit: 1G + depends_on: + litellm-db: + condition: service_healthy healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:4000/health || exit 1"] interval: 30s @@ -24,3 +27,29 @@ services: options: max-size: "50m" max-file: "3" + + litellm-db: + image: postgres:15-alpine + container_name: litellm-db + restart: unless-stopped + user: "1024:100" + environment: + - POSTGRES_DB=litellm + - POSTGRES_USER=litellm + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + volumes: + - /mnt/docker-data/databases/litellm-db:/var/lib/postgresql/data + labels: + - "com.centurylinklabs.watchtower.enable=false" + mem_limit: 256M + healthcheck: + test: ["CMD-SHELL", "pg_isready -U litellm -d litellm"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + logging: + driver: "json-file" + options: + max-size: "50m" + max-file: "3"