b5b004509d
Multi-stage Dockerfile (Node 22 Alpine), docker-compose for self-hosted and hosted deployments, CI workflow for GHCR publishing, runtime env var substitution, and cron sidecar with supercronic. Aligns hosted extension preset with dev config (enable-banking, ai-categorization, ai-chat, email). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
16 lines
587 B
Bash
Executable File
16 lines
587 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
# Replace build-time placeholder sentinels with runtime env vars in static JS bundles.
|
|
# This allows a single pre-built image to work with any Supabase project.
|
|
if [ -d /app/.next/static ]; then
|
|
find /app/.next/static -name '*.js' -exec sed -i \
|
|
-e "s|__NEXT_PUBLIC_SUPABASE_URL__|${NEXT_PUBLIC_SUPABASE_URL}|g" \
|
|
-e "s|__NEXT_PUBLIC_SUPABASE_ANON_KEY__|${NEXT_PUBLIC_SUPABASE_ANON_KEY}|g" \
|
|
-e "s|__NEXT_PUBLIC_APP_URL__|${NEXT_PUBLIC_APP_URL}|g" \
|
|
-e "s|__NEXT_PUBLIC_VAPID_PUBLIC_KEY__|${NEXT_PUBLIC_VAPID_PUBLIC_KEY:-}|g" \
|
|
{} +
|
|
fi
|
|
|
|
exec "$@"
|