mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-11-10 13:24:05 +08:00
docker compose: add enable admin parameter (#20791)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
1 parent
f6477b1977
commit
f80b09af04
2 files changed
+11
-3
No files matched your search
@@ -22,6 +22,7 @@ services:
|
||||
|
||||
# Example configuration to start Admin server:
|
||||
command:
|
||||
- --enable-adminserver
|
||||
- --init-superuser
|
||||
#- --init-model-provider-tables
|
||||
ports:
|
||||
|
||||
+10
-3
@@ -26,6 +26,7 @@ function usage() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
ENABLE_ADMIN_SERVER=0 # Default close admin server
|
||||
ENABLE_API_SERVER=1 # Default to enable web server
|
||||
ENABLE_INGESTOR=1 # Default to enable ingestor
|
||||
ENABLE_DATASYNC=1
|
||||
@@ -49,6 +50,10 @@ for arg in "$@"; do
|
||||
ENABLE_DATASYNC=0
|
||||
shift
|
||||
;;
|
||||
--enable-adminserver)
|
||||
ENABLE_ADMIN_SERVER=1
|
||||
shift
|
||||
;;
|
||||
--init-model-provider-tables)
|
||||
INIT_MODEL_PROVIDER_TABLES=1
|
||||
shift
|
||||
@@ -118,7 +123,7 @@ function go_backend_enabled() {
|
||||
if [[ "${ENABLE_DATASYNC}" -eq 1 ]]; then
|
||||
return 0
|
||||
fi
|
||||
if [[ "${ENABLE_API_SERVER}" -eq 1 ]]; then
|
||||
if [[ "${ENABLE_ADMIN_SERVER}" -eq 1 ]] || [[ "${ENABLE_API_SERVER}" -eq 1 ]]; then
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
@@ -156,8 +161,10 @@ if go_backend_enabled; then
|
||||
run_go_migrations
|
||||
fi
|
||||
|
||||
echo "Starting Admin go server..."
|
||||
run_with_restart "Admin go server" bin/ragflow_server --admin ${INIT_SUPERUSER_ARGS} &
|
||||
if [[ "${ENABLE_ADMIN_SERVER}" -eq 1 ]]; then
|
||||
echo "Starting Admin go server..."
|
||||
run_with_restart "Admin go server" bin/ragflow_server --admin ${INIT_SUPERUSER_ARGS} &
|
||||
fi
|
||||
|
||||
if [[ "${ENABLE_API_SERVER}" -eq 1 ]]; then
|
||||
echo "Starting nginx..."
|
||||
|
||||
Reference in new issue
Block a user