4 核 8G 同时跑协会站点、PlayEdu 和估价智能体,并让门户专家页底色透出页面背景。 Co-authored-by: Cursor <cursoragent@cursor.com>
46 lines
1005 B
Bash
Executable File
46 lines
1005 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
existed=0
|
|
if [[ -f .env ]]; then
|
|
existed=1
|
|
fi
|
|
./init-env.sh
|
|
./init-dify-env.sh
|
|
./render-nginx.sh
|
|
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
|