Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
0e1163f6
Unverified
Commit
0e1163f6
authored
Jan 18, 2024
by
takatost
Committed by
GitHub
Jan 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: remove deprecated envs (#2078)
parent
8654415f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
34 deletions
+7
-34
.env.example
api/.env.example
+0
-1
Dockerfile
api/Dockerfile
+0
-1
config.py
api/config.py
+5
-16
docker-compose.yaml
docker/docker-compose.yaml
+0
-4
entrypoint.sh
web/docker/entrypoint.sh
+2
-12
No files found.
api/.env.example
View file @
0e1163f6
...
...
@@ -15,7 +15,6 @@ CONSOLE_WEB_URL=http://127.0.0.1:3000
SERVICE_API_URL=http://127.0.0.1:5001
# Web APP base URL
APP_API_URL=http://127.0.0.1:5001
APP_WEB_URL=http://127.0.0.1:3000
# Files URL
...
...
api/Dockerfile
View file @
0e1163f6
...
...
@@ -19,7 +19,6 @@ ENV DEPLOY_ENV PRODUCTION
ENV
CONSOLE_API_URL http://127.0.0.1:5001
ENV
CONSOLE_WEB_URL http://127.0.0.1:3000
ENV
SERVICE_API_URL http://127.0.0.1:5001
ENV
APP_API_URL http://127.0.0.1:5001
ENV
APP_WEB_URL http://127.0.0.1:3000
EXPOSE
5001
...
...
api/config.py
View file @
0e1163f6
...
...
@@ -22,7 +22,6 @@ DEFAULTS = {
'CONSOLE_API_URL'
:
'https://cloud.dify.ai'
,
'SERVICE_API_URL'
:
'https://api.dify.ai'
,
'APP_WEB_URL'
:
'https://udify.app'
,
'APP_API_URL'
:
'https://udify.app'
,
'FILES_URL'
:
''
,
'STORAGE_TYPE'
:
'local'
,
'STORAGE_LOCAL_PATH'
:
'storage'
,
...
...
@@ -94,7 +93,7 @@ class Config:
# ------------------------
# General Configurations.
# ------------------------
self
.
CURRENT_VERSION
=
"0.4.
8
"
self
.
CURRENT_VERSION
=
"0.4.
7
"
self
.
COMMIT_SHA
=
get_env
(
'COMMIT_SHA'
)
self
.
EDITION
=
"SELF_HOSTED"
self
.
DEPLOY_ENV
=
get_env
(
'DEPLOY_ENV'
)
...
...
@@ -103,35 +102,25 @@ class Config:
# The backend URL prefix of the console API.
# used to concatenate the login authorization callback or notion integration callback.
self
.
CONSOLE_API_URL
=
get_env
(
'CONSOLE_
URL'
)
if
get_env
(
'CONSOLE_URL'
)
else
get_env
(
'CONSOLE_
API_URL'
)
self
.
CONSOLE_API_URL
=
get_env
(
'CONSOLE_API_URL'
)
# The front-end URL prefix of the console web.
# used to concatenate some front-end addresses and for CORS configuration use.
self
.
CONSOLE_WEB_URL
=
get_env
(
'CONSOLE_URL'
)
if
get_env
(
'CONSOLE_URL'
)
else
get_env
(
'CONSOLE_WEB_URL'
)
# WebApp API backend Url prefix.
# used to declare the back-end URL for the front-end API.
self
.
APP_API_URL
=
get_env
(
'APP_URL'
)
if
get_env
(
'APP_URL'
)
else
get_env
(
'APP_API_URL'
)
self
.
CONSOLE_WEB_URL
=
get_env
(
'CONSOLE_WEB_URL'
)
# WebApp Url prefix.
# used to display WebAPP API Base Url to the front-end.
self
.
APP_WEB_URL
=
get_env
(
'APP_
URL'
)
if
get_env
(
'APP_URL'
)
else
get_env
(
'APP_
WEB_URL'
)
self
.
APP_WEB_URL
=
get_env
(
'APP_WEB_URL'
)
# Service API Url prefix.
# used to display Service API Base Url to the front-end.
self
.
SERVICE_API_URL
=
get_env
(
'
API_URL'
)
if
get_env
(
'API_URL'
)
else
get_env
(
'
SERVICE_API_URL'
)
self
.
SERVICE_API_URL
=
get_env
(
'SERVICE_API_URL'
)
# File preview or download Url prefix.
# used to display File preview or download Url to the front-end or as Multi-model inputs;
# Url is signed and has expiration time.
self
.
FILES_URL
=
get_env
(
'FILES_URL'
)
if
get_env
(
'FILES_URL'
)
else
self
.
CONSOLE_API_URL
# Fallback Url prefix.
# Will be deprecated in the future.
self
.
CONSOLE_URL
=
get_env
(
'CONSOLE_URL'
)
self
.
API_URL
=
get_env
(
'API_URL'
)
self
.
APP_URL
=
get_env
(
'APP_URL'
)
# Your App secret key will be used for securely signing the session cookie
# Make sure you are changing this key for your deployment with a strong key.
# You can generate a strong key using `openssl rand -base64 42`.
...
...
docker/docker-compose.yaml
View file @
0e1163f6
...
...
@@ -23,10 +23,6 @@ services:
# different from console domain.
# example: http://api.dify.ai
SERVICE_API_URL
:
'
'
# The URL prefix for Web APP api server, 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_API_URL
:
'
'
# The URL prefix for Web APP frontend, 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
...
...
web/docker/entrypoint.sh
View file @
0e1163f6
...
...
@@ -4,18 +4,8 @@ set -e
export
NEXT_PUBLIC_DEPLOY_ENV
=
${
DEPLOY_ENV
}
export
NEXT_PUBLIC_EDITION
=
${
EDITION
}
if
[[
-z
"
$CONSOLE_URL
"
]]
;
then
export
NEXT_PUBLIC_API_PREFIX
=
${
CONSOLE_API_URL
}
/console/api
else
export
NEXT_PUBLIC_API_PREFIX
=
${
CONSOLE_URL
}
/console/api
fi
if
[[
-z
"
$APP_URL
"
]]
;
then
export
NEXT_PUBLIC_PUBLIC_API_PREFIX
=
${
APP_API_URL
}
/api
else
export
NEXT_PUBLIC_PUBLIC_API_PREFIX
=
${
APP_URL
}
/api
fi
export
NEXT_PUBLIC_API_PREFIX
=
${
CONSOLE_API_URL
}
/console/api
export
NEXT_PUBLIC_PUBLIC_API_PREFIX
=
${
APP_API_URL
}
/api
export
NEXT_PUBLIC_SENTRY_DSN
=
${
SENTRY_DSN
}
export
NEXT_PUBLIC_SITE_ABOUT
=
${
SITE_ABOUT
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment