diff --git a/docker-compose.yml b/docker-compose.yml index 05439b1df..6c1f5f57b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,16 +1,29 @@ -version: "3.9" +version: "3.11" services: litellm: build: context: . args: target: runtime - image: ghcr.io/berriai/litellm:main-latest + image: ghcr.io/berriai/litellm:main-stable ports: - "4000:4000" # Map the container port to the host, change the host port if necessary - volumes: - - ./litellm-config.yaml:/app/config.yaml # Mount the local configuration file - # 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 - command: [ "--config", "/app/config.yaml", "--port", "4000", "--num_workers", "8" ] + environment: + DATABASE_URL: "postgresql://postgres:example@db:5432/postgres" + STORE_MODEL_IN_DB: "True" # allows adding models to proxy via UI + env_file: + - .env # Load local .env file + + + db: + image: postgres + restart: always + environment: + POSTGRES_PASSWORD: example + healthcheck: + test: ["CMD-SHELL", "pg_isready"] + interval: 1s + timeout: 5s + retries: 10 # ...rest of your docker-compose config if any \ No newline at end of file diff --git a/docs/my-website/docs/proxy/deploy.md b/docs/my-website/docs/proxy/deploy.md index f9a7db2d4..6fb8c5bfe 100644 --- a/docs/my-website/docs/proxy/deploy.md +++ b/docs/my-website/docs/proxy/deploy.md @@ -7,6 +7,23 @@ You can find the Dockerfile to build litellm proxy [here](https://github.com/Ber ## Quick Start +To start using Litellm, run the following commands in a shell: + +```bash +# Get the code +git clone https://github.com/BerriAI/litellm + +# Go to folder +cd litellm + +# Add the master key +echo 'LITELLM_MASTER_KEY="sk-1234"' > .env +source .env + +# Start +docker-compose up +``` +