+8
-6
@@ -13,13 +13,10 @@ fi
|
||||
|
||||
PLUGIN_DIR="/cryptpad/lib/plugins/sso"
|
||||
VERSION_FILE="${PLUGIN_DIR}/.version"
|
||||
SSO_PLUGIN_VERSION="${SSO_PLUGIN_VERSION:-0.4.0}"
|
||||
SSO_PLUGIN_VERSION="${SSO_PLUGIN_VERSION:-1.0.0}"
|
||||
|
||||
# Copy SSO config template into place (mounted as Docker config)
|
||||
if [ -f /sso.js ]; then
|
||||
cp /sso.js /cryptpad/config/sso.js
|
||||
echo "[sso-entrypoint] Copied sso.js config into /cryptpad/config/sso.js"
|
||||
fi
|
||||
# sso.js is mounted directly at /cryptpad/config/sso.js as a Docker config:
|
||||
# since CryptPad 2026.10.0, /cryptpad/config is root-owned and not writable.
|
||||
|
||||
# Install/update the SSO plugin
|
||||
if [ -f "${VERSION_FILE}" ] && [ "$(cat "${VERSION_FILE}")" = "${SSO_PLUGIN_VERSION}" ]; then
|
||||
@@ -29,6 +26,11 @@ else
|
||||
rm -rf "${PLUGIN_DIR}"
|
||||
git clone --depth 1 --branch "${SSO_PLUGIN_VERSION}" \
|
||||
https://github.com/cryptpad/sso.git "${PLUGIN_DIR}"
|
||||
# Since CryptPad 2026.10.0 the plugin's dependencies (openid-client,
|
||||
# node-saml, ...) are no longer bundled with CryptPad itself.
|
||||
if [ -f "${PLUGIN_DIR}/package.json" ]; then
|
||||
(cd "${PLUGIN_DIR}" && npm ci --omit=dev)
|
||||
fi
|
||||
echo "${SSO_PLUGIN_VERSION}" > "${VERSION_FILE}"
|
||||
echo "[sso-entrypoint] SSO plugin installed"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user