44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
services:
|
|
adc-init:
|
|
image: alpine:3.22
|
|
restart: "no"
|
|
environment:
|
|
GOOGLE_ADC_B64: ${GOOGLE_ADC_B64}
|
|
volumes:
|
|
- google-adc:/credentials
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- |
|
|
umask 077
|
|
printf '%s' "$${GOOGLE_ADC_B64}" | base64 -d > /credentials/application_default_credentials.json
|
|
|
|
litellm:
|
|
image: ghcr.io/berriai/litellm:main-stable
|
|
restart: unless-stopped
|
|
depends_on:
|
|
adc-init:
|
|
condition: service_completed_successfully
|
|
ports:
|
|
- "${LISTEN_IP:-127.0.0.1}:${HOST_PORT:-4000}:4000"
|
|
environment:
|
|
GOOGLE_APPLICATION_CREDENTIALS: /credentials/application_default_credentials.json
|
|
VERTEXAI_PROJECT: ${VERTEXAI_PROJECT}
|
|
VERTEXAI_LOCATION: ${VERTEXAI_LOCATION:-global}
|
|
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY}
|
|
volumes:
|
|
- ./config.yaml:/app/config.yaml:ro
|
|
- google-adc:/credentials:ro
|
|
- ./runtime:/runtime
|
|
entrypoint: ["/bin/sh", "-c"]
|
|
command:
|
|
- exec /app/docker/prod_entrypoint.sh --config /app/config.yaml --host 0.0.0.0 --port 4000 > /runtime/litellm.log 2>&1
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 1m
|
|
max-file: "2"
|
|
|
|
volumes:
|
|
google-adc:
|