43 lines
884 B
YAML
43 lines
884 B
YAML
|
|
services:
|
||
|
|
litellm:
|
||
|
|
image: ghcr.io/berriai/litellm:main-latest
|
||
|
|
container_name: litellm
|
||
|
|
restart: always
|
||
|
|
ports:
|
||
|
|
- "4000:4000"
|
||
|
|
environment:
|
||
|
|
- LITELLM_MASTER_KEY=${API_KEY}
|
||
|
|
- GROQ_API_KEY=${GROQ_API_KEY}
|
||
|
|
env_file:
|
||
|
|
- .env
|
||
|
|
volumes:
|
||
|
|
- ./config.yaml:/app/config.yaml
|
||
|
|
command: --config /app/config.yaml --port 4000
|
||
|
|
networks:
|
||
|
|
- app-network
|
||
|
|
app:
|
||
|
|
build: .
|
||
|
|
container_name: nodejs-app
|
||
|
|
ports:
|
||
|
|
- "9898:9898" # Adjust port if needed
|
||
|
|
environment:
|
||
|
|
- NODE_ENV=production
|
||
|
|
- LLM_API_ENDPOINT=http://litellm:4000/v1/chat/completions
|
||
|
|
env_file:
|
||
|
|
- .env
|
||
|
|
volumes:
|
||
|
|
# Optional: mount for development
|
||
|
|
- .:/app
|
||
|
|
# - /app/node_modules
|
||
|
|
restart: unless-stopped
|
||
|
|
networks:
|
||
|
|
- app-network
|
||
|
|
depends_on:
|
||
|
|
- litellm
|
||
|
|
|
||
|
|
networks:
|
||
|
|
app-network:
|
||
|
|
driver: bridge
|
||
|
|
|
||
|
|
|