mirror of
https://github.com/casjaysdevdocker/super-productivity
synced 2026-09-04 03:03:49 -04:00
🗑️ Remove WebDAV sync support; SuperSync only 🗑️
WebDAV was added as an alternative sync provider but the design decision is to ship SuperSync only. Removes all WebDAV env vars, the nginx reverse proxy block for /webdav/, and the WebDAV branch in __pre_execute that wrote sync-config-default-override.json. SuperSync behavior is unchanged. - Dockerfile: drop WEBDAV_BACKEND, WEBDAV_BASE_URL, WEBDAV_USERNAME, WEBDAV_SYNC_FOLDER_PATH from ENV declarations - rootfs/usr/local/etc/docker/init.d/zz-nginx.sh: remove WEBDAV_* variable declarations, nginx /webdav/ proxy location block, and WebDAV branch in __pre_execute sync config generation Dockerfile rootfs/usr/local/etc/docker/functions/entrypoint.sh rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
This commit is contained in:
@@ -117,10 +117,6 @@ ENV ENV="~/.bashrc" \
|
|||||||
HOSTNAME="casjaysdev-${IMAGE_NAME}" \
|
HOSTNAME="casjaysdev-${IMAGE_NAME}" \
|
||||||
WWW_ROOT_DIR="${WWW_ROOT_DIR}" \
|
WWW_ROOT_DIR="${WWW_ROOT_DIR}" \
|
||||||
APP_PORT="80" \
|
APP_PORT="80" \
|
||||||
WEBDAV_BACKEND="" \
|
|
||||||
WEBDAV_BASE_URL="" \
|
|
||||||
WEBDAV_USERNAME="" \
|
|
||||||
WEBDAV_SYNC_FOLDER_PATH="" \
|
|
||||||
SYNC_INTERVAL="" \
|
SYNC_INTERVAL="" \
|
||||||
IS_COMPRESSION_ENABLED="" \
|
IS_COMPRESSION_ENABLED="" \
|
||||||
IS_ENCRYPTION_ENABLED="" \
|
IS_ENCRYPTION_ENABLED="" \
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
##@Version : 202606261200-git
|
##@Version : 202606261430-git
|
||||||
# @@Author : Jason Hempstead
|
# @@Author : Jason Hempstead
|
||||||
# @@Contact : git-admin@casjaysdev.pro
|
# @@Contact : git-admin@casjaysdev.pro
|
||||||
# @@License : LICENSE.md
|
# @@License : LICENSE.md
|
||||||
@@ -802,7 +802,7 @@ __set_user_group_id() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
if [ -z "$set_user" ] || [ "$set_user" = "root" ]; then
|
if [ -z "$set_user" ] || [ "$set_user" = "root" ]; then
|
||||||
return
|
return 0
|
||||||
fi
|
fi
|
||||||
if grep -shq "^$set_user:" "/etc/passwd" "/etc/group"; then
|
if grep -shq "^$set_user:" "/etc/passwd" "/etc/group"; then
|
||||||
if __check_for_guid "$set_gid"; then
|
if __check_for_guid "$set_gid"; then
|
||||||
|
|||||||
@@ -229,10 +229,6 @@ fi
|
|||||||
# Additional predefined variables
|
# Additional predefined variables
|
||||||
# Runtime sync-provider env vars (read in __pre_execute to seed sync-config-default-override.json)
|
# Runtime sync-provider env vars (read in __pre_execute to seed sync-config-default-override.json)
|
||||||
APP_PORT="${APP_PORT:-80}"
|
APP_PORT="${APP_PORT:-80}"
|
||||||
WEBDAV_BACKEND="${WEBDAV_BACKEND:-}"
|
|
||||||
WEBDAV_BASE_URL="${WEBDAV_BASE_URL:-}"
|
|
||||||
WEBDAV_USERNAME="${WEBDAV_USERNAME:-}"
|
|
||||||
WEBDAV_SYNC_FOLDER_PATH="${WEBDAV_SYNC_FOLDER_PATH:-}"
|
|
||||||
SYNC_INTERVAL="${SYNC_INTERVAL:-}"
|
SYNC_INTERVAL="${SYNC_INTERVAL:-}"
|
||||||
IS_COMPRESSION_ENABLED="${IS_COMPRESSION_ENABLED:-}"
|
IS_COMPRESSION_ENABLED="${IS_COMPRESSION_ENABLED:-}"
|
||||||
IS_ENCRYPTION_ENABLED="${IS_ENCRYPTION_ENABLED:-}"
|
IS_ENCRYPTION_ENABLED="${IS_ENCRYPTION_ENABLED:-}"
|
||||||
@@ -334,7 +330,6 @@ __update_conf_files() {
|
|||||||
# set hostname
|
# set hostname
|
||||||
local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}"
|
local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}"
|
||||||
local app_port="${APP_PORT:-80}"
|
local app_port="${APP_PORT:-80}"
|
||||||
local webdav_backend="${WEBDAV_BACKEND:-}"
|
|
||||||
local wwwroot="${WWW_ROOT_DIR:-/usr/local/share/httpd/default}"
|
local wwwroot="${WWW_ROOT_DIR:-/usr/local/share/httpd/default}"
|
||||||
local nginx_conf
|
local nginx_conf
|
||||||
|
|
||||||
@@ -363,23 +358,6 @@ __update_conf_files() {
|
|||||||
echo ' add_header Cache-Control "public, immutable";'
|
echo ' add_header Cache-Control "public, immutable";'
|
||||||
echo " access_log off;"
|
echo " access_log off;"
|
||||||
echo " }"
|
echo " }"
|
||||||
if [ -n "$webdav_backend" ]; then
|
|
||||||
echo ""
|
|
||||||
echo " # WebDAV reverse proxy — strips /webdav/ prefix before forwarding"
|
|
||||||
echo " location = /webdav { return 302 /webdav/; }"
|
|
||||||
echo " location /webdav/ {"
|
|
||||||
echo " resolver 127.0.0.11;"
|
|
||||||
echo ' rewrite ^/webdav/(.*)$ /$1 break;'
|
|
||||||
echo " proxy_pass ${webdav_backend};"
|
|
||||||
echo ' proxy_set_header Host $http_host;'
|
|
||||||
echo ' proxy_set_header X-Real-IP $remote_addr;'
|
|
||||||
echo ' proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;'
|
|
||||||
echo ' proxy_set_header X-Forwarded-Proto $scheme;'
|
|
||||||
echo ' proxy_pass_header Authorization;'
|
|
||||||
echo " client_max_body_size 0;"
|
|
||||||
echo " proxy_request_buffering off;"
|
|
||||||
echo " }"
|
|
||||||
fi
|
|
||||||
echo ""
|
echo ""
|
||||||
echo " # Health check endpoint used by HEALTHCHECK in Dockerfile"
|
echo " # Health check endpoint used by HEALTHCHECK in Dockerfile"
|
||||||
echo " location = /health {"
|
echo " location = /health {"
|
||||||
@@ -419,18 +397,6 @@ __pre_execute() {
|
|||||||
if command -v jq >/dev/null 2>&1; then
|
if command -v jq >/dev/null 2>&1; then
|
||||||
local json="{}"
|
local json="{}"
|
||||||
|
|
||||||
# WebDAV sync provider settings (mutually exclusive with SuperSync)
|
|
||||||
if [ -n "${WEBDAV_BASE_URL:-}" ]; then
|
|
||||||
json=$(printf '%s' "$json" | jq '.syncProvider = "WebDAV"')
|
|
||||||
json=$(printf '%s' "$json" | jq --arg v "$WEBDAV_BASE_URL" '.webDav.baseUrl = $v')
|
|
||||||
fi
|
|
||||||
if [ -n "${WEBDAV_USERNAME:-}" ]; then
|
|
||||||
json=$(printf '%s' "$json" | jq --arg v "$WEBDAV_USERNAME" '.webDav.userName = $v')
|
|
||||||
fi
|
|
||||||
if [ -n "${WEBDAV_SYNC_FOLDER_PATH:-}" ]; then
|
|
||||||
json=$(printf '%s' "$json" | jq --arg v "$WEBDAV_SYNC_FOLDER_PATH" '.webDav.syncFolderPath = $v')
|
|
||||||
fi
|
|
||||||
|
|
||||||
# SuperSync (super-productivity's own operation-based sync server)
|
# SuperSync (super-productivity's own operation-based sync server)
|
||||||
# SUPERSYNC_BASE_URL overrides the default https://sync.super-productivity.com
|
# SUPERSYNC_BASE_URL overrides the default https://sync.super-productivity.com
|
||||||
# Auth tokens are obtained through the in-app login flow after startup.
|
# Auth tokens are obtained through the in-app login flow after startup.
|
||||||
|
|||||||
Reference in New Issue
Block a user