Skip to content

Commit 63fb3a9

Browse files
Merge pull request #3961 from BerriAI/litellm_docker_compose_start
Litellm docker compose start
2 parents 2245ee1 + ce4ba80 commit 63fb3a9

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

docker-compose.yml

+19-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
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+
env_file:
15+
- .env # Load local .env file
16+
17+
18+
db:
19+
image: postgres
20+
restart: always
21+
environment:
22+
POSTGRES_PASSWORD: example
23+
healthcheck:
24+
test: ["CMD-SHELL", "pg_isready"]
25+
interval: 1s
26+
timeout: 5s
27+
retries: 10
1528

1629
# ...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)