From d4911a902841ec9786a0bd183c95b6909825fc80 Mon Sep 17 00:00:00 2001 From: ytqh Date: Sat, 25 Jan 2025 16:43:39 +0800 Subject: [PATCH] add proxy to template --- docker/.env.example | 5 +++++ docker/docker-compose-template.yaml | 4 ++++ docker/docker-compose.yaml | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/docker/.env.example b/docker/.env.example index b21bdc7085..9ffaa4a406 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -932,3 +932,8 @@ MAX_SUBMIT_COUNT=100 # The maximum number of top-k value for RAG. TOP_K_MAX_VALUE=10 + +# 代理配置 +HTTP_PROXY= +HTTPS_PROXY= +NO_PROXY= diff --git a/docker/docker-compose-template.yaml b/docker/docker-compose-template.yaml index 8aafc61888..19f7f075da 100644 --- a/docker/docker-compose-template.yaml +++ b/docker/docker-compose-template.yaml @@ -4,6 +4,8 @@ services: api: image: langgenius/dify-api:0.15.2 restart: always + extra_hosts: + - "host.docker.internal:host-gateway" environment: # Use the shared environment variables. <<: *shared-api-worker-env @@ -27,6 +29,8 @@ services: worker: image: langgenius/dify-api:0.15.2 restart: always + extra_hosts: + - "host.docker.internal:host-gateway" environment: # Use the shared environment variables. <<: *shared-api-worker-env diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index a11ec261f3..0c4c3b2bfe 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -389,12 +389,17 @@ x-shared-env: &shared-api-worker-env CREATE_TIDB_SERVICE_JOB_ENABLED: ${CREATE_TIDB_SERVICE_JOB_ENABLED:-false} MAX_SUBMIT_COUNT: ${MAX_SUBMIT_COUNT:-100} TOP_K_MAX_VALUE: ${TOP_K_MAX_VALUE:-10} + HTTP_PROXY: ${HTTP_PROXY:-} + HTTPS_PROXY: ${HTTPS_PROXY:-} + NO_PROXY: ${NO_PROXY:-} services: # API service api: image: langgenius/dify-api:0.15.2 restart: always + extra_hosts: + - "host.docker.internal:host-gateway" environment: # Use the shared environment variables. <<: *shared-api-worker-env @@ -418,6 +423,8 @@ services: worker: image: langgenius/dify-api:0.15.2 restart: always + extra_hosts: + - "host.docker.internal:host-gateway" environment: # Use the shared environment variables. <<: *shared-api-worker-env