mirror of
https://github.com/tiennm99/composes.git
synced 2026-10-14 06:17:37 +00:00
refactor: name supporting services and volumes by role
Rename database services to db and cache services to cache, with their volumes as db-data and cache-data, in litellm, owncloud and goclaw. Rename the couchbase and open-webui volumes to <service>-data. Data on miti-sg was copied into the new volumes beforehand; the old volumes are kept.
This commit is contained in:
1 parent
29f52dfcb3
commit
3ea1b39e44
11 files changed
+42
-64
No files matched your search
+4
-4
@@ -4,8 +4,8 @@
|
||||
front of many LLM providers, with virtual keys, spend tracking and an admin UI
|
||||
at `/ui`.
|
||||
|
||||
Three containers: `litellm`, `postgres` for keys, teams, budgets and spend
|
||||
logs, and `redis` for the response cache.
|
||||
Three containers: `litellm`, `db` (PostgreSQL) for keys, teams, budgets and spend
|
||||
logs, and `cache` (Redis) for the response cache.
|
||||
|
||||
## Setup
|
||||
|
||||
@@ -64,8 +64,8 @@ enabled by uncommenting its line, without touching `config.yaml`.
|
||||
|
||||
| Volume | Mount | Holds |
|
||||
| --- | --- | --- |
|
||||
| `pg-data` | `/var/lib/postgresql/data` | The database |
|
||||
| `redis-data` | `/data` | Redis append-only file |
|
||||
| `db-data` | `/var/lib/postgresql/data` | The database |
|
||||
| `cache-data` | `/data` | Redis append-only file |
|
||||
|
||||
## Images
|
||||
|
||||
|
||||
+10
-10
@@ -6,8 +6,8 @@ services:
|
||||
- LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY:?required}
|
||||
- UI_USERNAME=${UI_USERNAME:-admin}
|
||||
- UI_PASSWORD=${UI_PASSWORD:?required}
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER:-litellm}:${POSTGRES_PASSWORD:?required}@postgres:5432/${POSTGRES_DB:-litellm}
|
||||
- REDIS_HOST=redis
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER:-litellm}:${POSTGRES_PASSWORD:?required}@db:5432/${POSTGRES_DB:-litellm}
|
||||
- REDIS_HOST=cache
|
||||
- REDIS_PORT=6379
|
||||
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-}
|
||||
- GEMINI_API_KEY=${GEMINI_API_KEY:-}
|
||||
@@ -35,9 +35,9 @@ services:
|
||||
- --max_requests_before_restart
|
||||
- "1000"
|
||||
depends_on:
|
||||
postgres:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
cache:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request;urllib.request.urlopen('http://127.0.0.1:4000/health/liveliness',timeout=5)"]
|
||||
@@ -51,7 +51,7 @@ services:
|
||||
memory: 4G
|
||||
|
||||
# PostgreSQL for keys, teams, budgets and spend logs.
|
||||
postgres:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
@@ -59,7 +59,7 @@ services:
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?required}
|
||||
- POSTGRES_DB=${POSTGRES_DB:-litellm}
|
||||
volumes:
|
||||
- pg-data:/var/lib/postgresql/data
|
||||
- db-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -h localhost -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
||||
interval: 5s
|
||||
@@ -67,12 +67,12 @@ services:
|
||||
retries: 3
|
||||
|
||||
# Redis for the response cache and router state.
|
||||
redis:
|
||||
cache:
|
||||
image: redis:7-alpine
|
||||
restart: unless-stopped
|
||||
command: redis-server --appendonly yes
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
- cache-data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
@@ -80,5 +80,5 @@ services:
|
||||
retries: 3
|
||||
|
||||
volumes:
|
||||
pg-data:
|
||||
redis-data:
|
||||
db-data:
|
||||
cache-data:
|
||||
Reference in new issue
Block a user