Files
memind/scripts/run-imgproxy-prod.sh
T
john 78e5a6c026
Memind CI / Test, build, and release guards (pull_request) Failing after 18s
feat(ops): add imgproxy native runtime tooling and record 103 deployment
Bundle vendored imgproxy with Mach-O dylibs for 103 launchd, fix install to exec the binary directly with launchctl enable, and document the live native release in the runtime topology.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-31 05:38:14 +08:00

33 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
RUNTIME_BASE="${IMGPROXY_RUNTIME_BASE:-/Users/john/Project/imgproxy-runtime}"
RUNTIME_DIR="${IMGPROXY_RUNTIME_DIR:-${RUNTIME_BASE}/current}"
ROOT="${ROOT:-/Users/john/Project/Memind}"
IMGPROXY_BIN="${RUNTIME_DIR}/vendor/imgproxy-runtime/bin/imgproxy"
[[ -x "${IMGPROXY_BIN}" ]] || {
echo "[imgproxy-start] missing binary: ${IMGPROXY_BIN}" >&2
exit 1
}
if [[ -f "${ROOT}/.env" ]]; then
set -a
# shellcheck disable=SC1090
source "${ROOT}/.env"
set +a
fi
: "${IMGPROXY_SIGNING_KEY:?missing IMGPROXY_SIGNING_KEY}"
: "${IMGPROXY_SIGNING_SALT:?missing IMGPROXY_SIGNING_SALT}"
: "${MINDSPACE_STORAGE_ROOT:?missing MINDSPACE_STORAGE_ROOT}"
export IMGPROXY_BIND="${IMGPROXY_BIND:-127.0.0.1:20082}"
export IMGPROXY_LOCAL_FILESYSTEM_ROOT="${MINDSPACE_STORAGE_ROOT}"
export IMGPROXY_KEY="${IMGPROXY_SIGNING_KEY}"
export IMGPROXY_SALT="${IMGPROXY_SIGNING_SALT}"
export IMGPROXY_USE_ETAG="${IMGPROXY_USE_ETAG:-true}"
export IMGPROXY_ENABLE_WEBP_DETECTION="${IMGPROXY_ENABLE_WEBP_DETECTION:-true}"
exec "${IMGPROXY_BIN}"