From 5d3e0f2a98852544561e1bb4ac2a6f090fc0966a Mon Sep 17 00:00:00 2001 From: yuhao1118 Date: Mon, 22 May 2023 20:34:50 +0800 Subject: [PATCH] feat: remove env.sh --- web/.env.example | 13 ++++++++----- web/env.sh | 8 -------- web/package.json | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) delete mode 100755 web/env.sh diff --git a/web/.env.example b/web/.env.example index f4b1e81882..3e4288de0a 100644 --- a/web/.env.example +++ b/web/.env.example @@ -1,9 +1,12 @@ -EDITION=SELF_HOSTED +# For production release, change this to PRODUCTION +export NEXT_PUBLIC_DEPLOY_ENV=DEVELOPMENT +# The deployment edition, SELF_HOSTED or CLOUD +export NEXT_PUBLIC_EDITION=SELF_HOSTED # The base URL of console application, refers to the Console base URL of WEB service if console domain is # different from api or web app domain. -# example: http://cloud.dify.ai -CONSOLE_URL=http://localhost:5001 +# example: http://cloud.dify.ai/console/api +export NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api # The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from # console or api domain. -# example: http://udify.app -APP_URL=http://localhost:5001 \ No newline at end of file +# example: http://udify.app/api +export NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api \ No newline at end of file diff --git a/web/env.sh b/web/env.sh deleted file mode 100755 index 7031180d3d..0000000000 --- a/web/env.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -[ ! -f .env ] || export $(grep -v '^#' .env | xargs) - -export NEXT_PUBLIC_DEPLOY_ENV=${DEPLOY_ENV} -export NEXT_PUBLIC_EDITION=${EDITION} -export NEXT_PUBLIC_API_PREFIX=${CONSOLE_URL}/console/api -export NEXT_PUBLIC_PUBLIC_API_PREFIX=${APP_URL}/api diff --git a/web/package.json b/web/package.json index f1c0416675..1037ee6f67 100644 --- a/web/package.json +++ b/web/package.json @@ -3,7 +3,7 @@ "version": "0.2.0", "private": true, "scripts": { - "dev": "source env.sh && next dev", + "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint",