feat(deploy): 在同一台机器上接入继续教育和 Dify
4 核 8G 同时跑协会站点、PlayEdu 和估价智能体,并让门户专家页底色透出页面背景。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
1b33361209
commit
a8e2e741d1
24 files changed
+1035
-85
No files matched your search
+35
-5
@@ -1,15 +1,45 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
created=0
|
||||
if [[ ! -f .env ]]; then
|
||||
./init-env.sh
|
||||
created=1
|
||||
existed=0
|
||||
if [[ -f .env ]]; then
|
||||
existed=1
|
||||
fi
|
||||
./init-env.sh
|
||||
./init-dify-env.sh
|
||||
./render-nginx.sh
|
||||
if [[ "$created" == 1 && "${1:-}" != "--yes" ]]; then
|
||||
if [[ "$existed" == 0 && "${1:-}" != "--yes" ]]; then
|
||||
echo "请先核对 .env 里的域名。确认后执行 ./up.sh --yes"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
set -a
|
||||
# shellcheck disable=SC1091
|
||||
source .env
|
||||
set +a
|
||||
|
||||
docker compose --env-file .env up -d
|
||||
|
||||
mkdir -p "${DATA_ROOT}/dify" dify/docker
|
||||
data_dir="$(cd "${DATA_ROOT}/dify" && pwd)"
|
||||
if [[ -e dify/docker/volumes && ! -L dify/docker/volumes ]]; then
|
||||
echo "dify/docker/volumes 已是目录,继续使用里面的数据"
|
||||
else
|
||||
ln -sfn "$data_dir" dify/docker/volumes
|
||||
fi
|
||||
|
||||
(
|
||||
unset REDIS_PASSWORD
|
||||
docker compose -p dify \
|
||||
--env-file dify/docker/.env \
|
||||
-f dify/docker/docker-compose.yaml \
|
||||
-f dify/docker/docker-compose.gsfdc.yml \
|
||||
up -d
|
||||
)
|
||||
|
||||
docker compose ps
|
||||
docker compose -p dify \
|
||||
--env-file dify/docker/.env \
|
||||
-f dify/docker/docker-compose.yaml \
|
||||
-f dify/docker/docker-compose.gsfdc.yml \
|
||||
ps
|
||||
Reference in new issue
Block a user