Add BIM Viewer to Synology deploy canon
This commit is contained in:
@@ -9,6 +9,7 @@ TASKER_REPO="${TASKER_REPO:-}"
|
||||
TASKER_SYNC_SOURCE="${TASKER_SYNC_SOURCE:-0}"
|
||||
TASKER_CHANGED_BASE="${TASKER_CHANGED_BASE:-}"
|
||||
GATEWAY_REPO="${GATEWAY_REPO:-}"
|
||||
BIM_REPO="${BIM_REPO:-}"
|
||||
SYNC_AUTHENTIK_TEMPLATES="${SYNC_AUTHENTIK_TEMPLATES:-0}"
|
||||
|
||||
RSYNC_METADATA_ARGS=()
|
||||
@@ -24,6 +25,10 @@ fi
|
||||
|
||||
mkdir -p "${NAS_ROOT}/platform"
|
||||
|
||||
rsync -av "${RSYNC_METADATA_ARGS[@]}" \
|
||||
"${PLATFORM_REPO}/infra/synology/.env.synology.example" \
|
||||
"${NAS_ROOT}/platform/.env.synology.example"
|
||||
|
||||
rsync -av "${RSYNC_METADATA_ARGS[@]}" \
|
||||
"${PLATFORM_REPO}/infra/synology/docker-compose.platform-http.yml" \
|
||||
"${NAS_ROOT}/platform/docker-compose.platform-http.yml"
|
||||
@@ -90,6 +95,7 @@ if [[ -n "${LAUNCHER_REPO}" ]]; then
|
||||
mkdir -p "${NAS_ROOT}/launcher/source"
|
||||
rsync -av "${RSYNC_METADATA_ARGS[@]}" --delete \
|
||||
--exclude='.git/' \
|
||||
--exclude='.DS_Store' \
|
||||
--exclude='node_modules/' \
|
||||
--exclude='dist/' \
|
||||
--exclude='server/storage/*' \
|
||||
@@ -100,6 +106,35 @@ else
|
||||
echo "LAUNCHER_REPO is not set; launcher source was not synced."
|
||||
fi
|
||||
|
||||
if [[ -n "${BIM_REPO}" ]]; then
|
||||
if [[ ! -f "${BIM_REPO}/docker-compose.beam.yml" || ! -d "${BIM_REPO}/server" || ! -d "${BIM_REPO}/frontend" ]]; then
|
||||
echo "BIM_REPO must point to NODEDC_BIM_VIEWER with docker-compose.beam.yml, server and frontend: ${BIM_REPO}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "${NAS_ROOT}/bim-viewer/source"
|
||||
rm -rf \
|
||||
"${NAS_ROOT}/bim-viewer/source/app" \
|
||||
"${NAS_ROOT}/bim-viewer/source/docs"
|
||||
rsync -av "${RSYNC_METADATA_ARGS[@]}" --delete \
|
||||
--exclude='.git/' \
|
||||
--exclude='.DS_Store' \
|
||||
--exclude='node_modules/' \
|
||||
--exclude='dist/' \
|
||||
--exclude='app/' \
|
||||
--exclude='docs/' \
|
||||
--exclude='server/node_modules/' \
|
||||
--exclude='frontend/node_modules/' \
|
||||
--exclude='server/data/' \
|
||||
--include='.env.synology.example' \
|
||||
--exclude='.env' \
|
||||
--exclude='.env.*' \
|
||||
"${BIM_REPO}/" \
|
||||
"${NAS_ROOT}/bim-viewer/source/"
|
||||
else
|
||||
echo "BIM_REPO is not set; BIM Viewer source was not synced."
|
||||
fi
|
||||
|
||||
if [[ -n "${TASKER_REPO}" ]]; then
|
||||
if [[ ! -d "${TASKER_REPO}/plane-src" || ! -d "${TASKER_REPO}/plane-app" ]]; then
|
||||
echo "TASKER_REPO must point to NODEDC_TASKMANAGER with plane-src and plane-app: ${TASKER_REPO}" >&2
|
||||
@@ -208,6 +243,18 @@ If runtime was already applied and only verification is needed:
|
||||
cd /volume1/docker/nodedc-platform/platform
|
||||
sudo bash verify-current-runtime.sh
|
||||
|
||||
Optional BIM Viewer apply after BIM_REPO sync:
|
||||
|
||||
cd /volume1/docker/nodedc-platform/bim-viewer/source
|
||||
sudo cp -n .env.synology.example .env
|
||||
# Edit .env before first production start: NODEDC_INTERNAL_ACCESS_TOKEN must match platform .env.synology.
|
||||
sudo /usr/local/bin/docker compose \
|
||||
--env-file .env \
|
||||
-f docker-compose.beam.yml \
|
||||
up -d --build --force-recreate ndc-beam-viewer nodedc-bim-converter
|
||||
|
||||
curl -k -fsS http://127.0.0.1:18100/api/auth/session
|
||||
|
||||
Manual equivalent:
|
||||
|
||||
cd /volume1/docker/nodedc-platform/platform
|
||||
|
||||
Reference in New Issue
Block a user