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
c2c37758
Commit
c2c37758
authored
Jul 18, 2023
by
John Wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/add-bash-before-entrypoint' into deploy/dev
parents
8eea8879
765c2b92
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
11 deletions
+10
-11
Dockerfile
api/Dockerfile
+1
-1
config.py
api/config.py
+1
-1
deal_dataset_vector_index_task.py
api/tasks/deal_dataset_vector_index_task.py
+3
-4
docker-compose.yaml
docker/docker-compose.yaml
+3
-3
Dockerfile
web/Dockerfile
+1
-1
package.json
web/package.json
+1
-1
No files found.
api/Dockerfile
View file @
c2c37758
...
@@ -27,4 +27,4 @@ RUN chmod +x /entrypoint.sh
...
@@ -27,4 +27,4 @@ RUN chmod +x /entrypoint.sh
ARG
COMMIT_SHA
ARG
COMMIT_SHA
ENV
COMMIT_SHA ${COMMIT_SHA}
ENV
COMMIT_SHA ${COMMIT_SHA}
ENTRYPOINT
["/entrypoint.sh"]
ENTRYPOINT
["/bin/bash", "/entrypoint.sh"]
\ No newline at end of file
\ No newline at end of file
api/config.py
View file @
c2c37758
...
@@ -89,7 +89,7 @@ class Config:
...
@@ -89,7 +89,7 @@ class Config:
self
.
CONSOLE_URL
=
get_env
(
'CONSOLE_URL'
)
self
.
CONSOLE_URL
=
get_env
(
'CONSOLE_URL'
)
self
.
API_URL
=
get_env
(
'API_URL'
)
self
.
API_URL
=
get_env
(
'API_URL'
)
self
.
APP_URL
=
get_env
(
'APP_URL'
)
self
.
APP_URL
=
get_env
(
'APP_URL'
)
self
.
CURRENT_VERSION
=
"0.3.
9
"
self
.
CURRENT_VERSION
=
"0.3.
10
"
self
.
COMMIT_SHA
=
get_env
(
'COMMIT_SHA'
)
self
.
COMMIT_SHA
=
get_env
(
'COMMIT_SHA'
)
self
.
EDITION
=
"SELF_HOSTED"
self
.
EDITION
=
"SELF_HOSTED"
self
.
DEPLOY_ENV
=
get_env
(
'DEPLOY_ENV'
)
self
.
DEPLOY_ENV
=
get_env
(
'DEPLOY_ENV'
)
...
...
api/tasks/deal_dataset_vector_index_task.py
View file @
c2c37758
...
@@ -44,14 +44,13 @@ def deal_dataset_vector_index_task(dataset_id: str, action: str):
...
@@ -44,14 +44,13 @@ def deal_dataset_vector_index_task(dataset_id: str, action: str):
if
dataset_documents
:
if
dataset_documents
:
# save vector index
# save vector index
index
=
IndexBuilder
.
get_index
(
dataset
,
'high_quality'
,
ignore_high_quality_check
=
True
)
index
=
IndexBuilder
.
get_index
(
dataset
,
'high_quality'
,
ignore_high_quality_check
=
True
)
documents
=
[]
for
dataset_document
in
dataset_documents
:
for
dataset_document
in
dataset_documents
:
# delete from vector index
# delete from vector index
segments
=
db
.
session
.
query
(
DocumentSegment
)
.
filter
(
segments
=
db
.
session
.
query
(
DocumentSegment
)
.
filter
(
DocumentSegment
.
document_id
==
dataset_document
.
id
,
DocumentSegment
.
document_id
==
dataset_document
.
id
,
DocumentSegment
.
enabled
==
True
DocumentSegment
.
enabled
==
True
)
.
order_by
(
DocumentSegment
.
position
.
asc
())
.
all
()
)
.
order_by
(
DocumentSegment
.
position
.
asc
())
.
all
()
documents
=
[]
for
segment
in
segments
:
for
segment
in
segments
:
document
=
Document
(
document
=
Document
(
page_content
=
segment
.
content
,
page_content
=
segment
.
content
,
...
@@ -65,8 +64,8 @@ def deal_dataset_vector_index_task(dataset_id: str, action: str):
...
@@ -65,8 +64,8 @@ def deal_dataset_vector_index_task(dataset_id: str, action: str):
documents
.
append
(
document
)
documents
.
append
(
document
)
# save vector index
# save vector index
index
.
add_texts
(
documents
)
index
.
add_texts
(
documents
)
end_at
=
time
.
perf_counter
()
end_at
=
time
.
perf_counter
()
logging
.
info
(
logging
.
info
(
...
...
docker/docker-compose.yaml
View file @
c2c37758
...
@@ -2,7 +2,7 @@ version: '3.1'
...
@@ -2,7 +2,7 @@ version: '3.1'
services
:
services
:
# API service
# API service
api
:
api
:
image
:
langgenius/dify-api:0.3.
9
image
:
langgenius/dify-api:0.3.
10
restart
:
always
restart
:
always
environment
:
environment
:
# Startup mode, 'api' starts the API server.
# Startup mode, 'api' starts the API server.
...
@@ -124,7 +124,7 @@ services:
...
@@ -124,7 +124,7 @@ services:
# worker service
# worker service
# The Celery worker for processing the queue.
# The Celery worker for processing the queue.
worker
:
worker
:
image
:
langgenius/dify-api:0.3.
9
image
:
langgenius/dify-api:0.3.
10
restart
:
always
restart
:
always
environment
:
environment
:
# Startup mode, 'worker' starts the Celery worker for processing the queue.
# Startup mode, 'worker' starts the Celery worker for processing the queue.
...
@@ -176,7 +176,7 @@ services:
...
@@ -176,7 +176,7 @@ services:
# Frontend web application.
# Frontend web application.
web
:
web
:
image
:
langgenius/dify-web:0.3.
9
image
:
langgenius/dify-web:0.3.
10
restart
:
always
restart
:
always
environment
:
environment
:
EDITION
:
SELF_HOSTED
EDITION
:
SELF_HOSTED
...
...
web/Dockerfile
View file @
c2c37758
...
@@ -26,4 +26,4 @@ RUN chmod +x /entrypoint.sh
...
@@ -26,4 +26,4 @@ RUN chmod +x /entrypoint.sh
ARG
COMMIT_SHA
ARG
COMMIT_SHA
ENV
COMMIT_SHA ${COMMIT_SHA}
ENV
COMMIT_SHA ${COMMIT_SHA}
ENTRYPOINT
["/entrypoint.sh"]
ENTRYPOINT
["/
bin/bash", "/
entrypoint.sh"]
web/package.json
View file @
c2c37758
{
{
"name"
:
"dify-web"
,
"name"
:
"dify-web"
,
"version"
:
"0.3.
9
"
,
"version"
:
"0.3.
10
"
,
"private"
:
true
,
"private"
:
true
,
"scripts"
:
{
"scripts"
:
{
"dev"
:
"next dev"
,
"dev"
:
"next dev"
,
...
...
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