Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>tags/1.8.1
| NEXT_PUBLIC_DEPLOY_ENV=DEVELOPMENT | NEXT_PUBLIC_DEPLOY_ENV=DEVELOPMENT | ||||
| # The deployment edition, SELF_HOSTED | # The deployment edition, SELF_HOSTED | ||||
| NEXT_PUBLIC_EDITION=SELF_HOSTED | NEXT_PUBLIC_EDITION=SELF_HOSTED | ||||
| # The base path for the application | |||||
| NEXT_PUBLIC_BASE_PATH= | |||||
| # The base URL of console application, refers to the Console base URL of WEB service if console domain is | # 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. | # different from api or web app domain. | ||||
| # example: http://cloud.dify.ai/console/api | # example: http://cloud.dify.ai/console/api |
| RUN corepack enable | RUN corepack enable | ||||
| ENV PNPM_HOME="/pnpm" | ENV PNPM_HOME="/pnpm" | ||||
| ENV PATH="$PNPM_HOME:$PATH" | ENV PATH="$PNPM_HOME:$PATH" | ||||
| ENV NEXT_PUBLIC_BASE_PATH= | |||||
| # install packages | # install packages |
| export NEXT_PUBLIC_DEPLOY_ENV=${DEPLOY_ENV} | export NEXT_PUBLIC_DEPLOY_ENV=${DEPLOY_ENV} | ||||
| export NEXT_PUBLIC_EDITION=${EDITION} | export NEXT_PUBLIC_EDITION=${EDITION} | ||||
| export NEXT_PUBLIC_BASE_PATH=${NEXT_PUBLIC_BASE_PATH} | |||||
| export NEXT_PUBLIC_API_PREFIX=${CONSOLE_API_URL}/console/api | export NEXT_PUBLIC_API_PREFIX=${CONSOLE_API_URL}/console/api | ||||
| export NEXT_PUBLIC_PUBLIC_API_PREFIX=${APP_API_URL}/api | export NEXT_PUBLIC_PUBLIC_API_PREFIX=${APP_API_URL}/api | ||||
| export NEXT_PUBLIC_MARKETPLACE_API_PREFIX=${MARKETPLACE_API_URL}/api/v1 | export NEXT_PUBLIC_MARKETPLACE_API_PREFIX=${MARKETPLACE_API_URL}/api/v1 |
| // export basePath to next.config.js | // export basePath to next.config.js | ||||
| // same as the one exported from var.ts | // same as the one exported from var.ts | ||||
| module.exports = { | module.exports = { | ||||
| basePath: '', | |||||
| basePath: process.env.NEXT_PUBLIC_BASE_PATH || '', | |||||
| assetPrefix: '', | assetPrefix: '', | ||||
| } | } |