qwen2api / docker-compose.yml
wdawdwa's picture
Deploy Qwen Local API to Hugging Face
9f2b1d2
raw
history blame contribute delete
925 Bytes
# qwen-local/docker-compose.yml (终极架构修正版)
services:
# 这是我们的“前台总机”服务
nginx:
image: nginx:latest
ports:
- "8082:80"
volumes:
# 关键修正: 直接覆盖主配置文件,而不是作为子配置被包含
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- qwen-local
networks:
- shared_network
# 这是我们的“工人”服务
qwen-local:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
# 工人不直接对外暴露端口
env_file:
- .env
environment:
- API_MASTER_KEY=1
- HTTP_PROXY=http://host.docker.internal:7890
- HTTPS_PROXY=http://host.docker.internal:7890
- NO_PROXY=localhost,127.0.0.1
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- shared_network
networks:
shared_network:
external: true