Skip to content

Commit 9b4a19b

Browse files
build(docker-compose.yml): startup docker compose with postgres
1 parent b8df5d1 commit 9b4a19b

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

docker-compose.yml

+16-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1-
version: "3.9"
1+
version: "3.11"
22
services:
33
litellm:
44
build:
55
context: .
66
args:
77
target: runtime
8-
image: ghcr.io/berriai/litellm:main-latest
8+
image: ghcr.io/berriai/litellm:main-stable
99
ports:
1010
- "4000:4000" # Map the container port to the host, change the host port if necessary
11-
volumes:
12-
- ./litellm-config.yaml:/app/config.yaml # Mount the local configuration file
13-
# You can change the port or number of workers as per your requirements or pass any new supported CLI augument. Make sure the port passed here matches with the container port defined above in `ports` value
14-
command: [ "--config", "/app/config.yaml", "--port", "4000", "--num_workers", "8" ]
11+
environment:
12+
DATABASE_URL: "postgresql://postgres:example@db:5432/postgres"
13+
STORE_MODEL_IN_DB: "True" # allows adding models to proxy via UI
14+
15+
db:
16+
image: postgres
17+
restart: always
18+
environment:
19+
POSTGRES_PASSWORD: example
20+
healthcheck:
21+
test: ["CMD-SHELL", "pg_isready"]
22+
interval: 1s
23+
timeout: 5s
24+
retries: 10
1525

1626
# ...rest of your docker-compose config if any

docs/my-website/docs/proxy/deploy.md

+17
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ You can find the Dockerfile to build litellm proxy [here](https://github.com/Ber
77

88
## Quick Start
99

10+
To start using Litellm, run the following commands in a shell:
11+
12+
```bash
13+
# Get the code
14+
git clone https://github.com/BerriAI/litellm
15+
16+
# Go to folder
17+
cd litellm
18+
19+
# Add the master key
20+
echo 'LITELLM_MASTER_KEY="sk-1234"' > .env
21+
source .env
22+
23+
# Start
24+
docker-compose up
25+
```
26+
1027
<Tabs>
1128

1229
<TabItem value="basic" label="Basic">

0 commit comments

Comments
 (0)