File size: 925 Bytes
9f2b1d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
36
37
38
39
# 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