-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
lobe chat main branch, commit: 2dc712a9be7a8a62a677bfd4220b686eeb0f6b11
注意:重新安装时,只需要删掉lobe-chat容器,然后拉取最新lobe-chat容器,执行docker compose up -d。不要删除docker-compose.yml和init_data.json,也不要删除data和s3_data。否则之前的数据就丢失了。代码是否拉取最新的无所谓。因为使用的并不是最新代码提供的docker compose文件,而是本地的。
docker rm -f lobe-chat
docker pull lobehub/lobe-chat-database:latest
docker compose up -d # Or: docker-compose up -dpwd
# /Users/yusongli/Documents/lobe-chat/docker-compose
docker rm -f lobe-chat lobe-minio lobe-casdoor lobe-network lobe-postgres
rm -rf data s3_data
cp local/docker-compose.yml local/init_data.json .
cp local/.env.example .env
sed -i 's#./server --createDatabase=true#sleep 5; ./server --createDatabase=true#g' docker-compose.yml
# Add `S3_SET_ACL=0` to lobe chat for minio
# sed -i "0,/^\\([ \t]*\\).*S3_BUCKET.*/ { // { h; s//\\1- 'S3_SET_ACL=0'/; H; x; } }" docker-compose.yml
# For embedding:
echo "\nDEFAULT_FILES_CONFIG=embedding_model=siliconcloud/Pro/BAAI/bge-m3" >> .env
sed -i "0,/^\\([ \t]*\\).*NEXT_AUTH_SSO_PROVIDERS.*/ { // { h; s//\\1- 'DEFAULT_FILES_CONFIG=\${DEFAULT_FILES_CONFIG}'/; H; x; } }" docker-compose.yml
# sed -i 's/host=postgresql/host="host.docker.internal"/g' docker-compose.yml
# sed -i 's/postgresql:5432/host.docker.internal:5432/g' docker-compose.yml
patch < diff
bash setup.sh
docker compose up -d # Or: docker-compose up -ddiff --git a/docker-compose/setup.sh b/docker-compose/setup.sh
index c52770aac..fcd1dbeb3 100644
--- a/docker-compose/setup.sh
+++ b/docker-compose/setup.sh
@@ -6,13 +6,13 @@
# check operating system
# ref: https://github.com/lobehub/lobe-chat/pull/5247
-if [[ "$OSTYPE" == "darwin"* ]]; then
- # macOS
- SED_COMMAND="sed -i ''"
-else
+# if [[ "$OSTYPE" == "darwin"* ]]; then
+# # macOS
+# SED_COMMAND="sed -i ''"
+# else
# not macOS
SED_COMMAND="sed -i"
-fi
+# fi
# ======================
# == Process the args ==
@@ -446,8 +446,8 @@ section_download_files(){
if [ -d "data" ] || [ -d "s3_data" ]; then
show_message "tips_already_installed"
exit 0
-else
- section_download_files
+# else
+# section_download_files
fi
section_configurate_host() {
@@ -480,7 +480,11 @@ section_configurate_host() {
# If user not specify host, try to get the server ip
if [ -z "$HOST" ]; then
- HOST=$(hostname -I | awk '{print $1}')
+ if [[ "$OSTYPE" == "darwin"* ]]; then
+ HOST=$(ifconfig en0 |awk '/inet / {print $2; }')
+ else
+ HOST=$(hostname -I | awk '{print $1}')
+ fi
# If the host is a private ip and the deploy mode is port mode
if [[ "$DEPLOY_MODE" == "1" ]] && ([[ "$HOST" == "192.168."* ]] || [[ "$HOST" == "172."* ]] || [[ "$HOST" == "10."* ]]); then
echo $(show_message "tips_private_ip_detected")Metadata
Metadata
Assignees
Labels
No labels