File size: 804 Bytes
075c5a0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | version: "3.9"
services:
litellm:
image: ghcr.io/berriai/litellm:v1.83.14-stable # 显式指定安全版本,勿用 latest
container_name: litellm
restart: unless-stopped
env_file:
- .env
volumes:
- ./litellm-config.yaml:/app/config.yaml
command: ["--config", "/app/config.yaml", "--port", "4000"]
# 不对外暴露端口,只让 Nginx 访问
expose:
- "4000"
networks:
- ai-net
nginx:
image: nginx:1.25-alpine
container_name: litellm-nginx
restart: unless-stopped
ports:
- "80:80"
# - "443:443" # 如需 HTTPS 请自行挂载证书
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- litellm
networks:
- ai-net
networks:
ai-net:
driver: bridge |