#!/bin/sh # Convivo app — container entrypoint. # # Injects the Supabase proxy target into the nginx config template, then starts # nginx. The target defaults to the Kong container on the shared Supabase # network (supabase_kong_Convivo:8000 — Kong's internal port; 54321 is the # host-only mapping). Override with SUPABASE_PROXY_TARGET # (e.g. host.docker.internal:54321) if the core is not on the shared network. set -eu TARGET="${SUPABASE_PROXY_TARGET:-supabase_kong_Convivo:8000}" TEMPLATE=/etc/nginx/conf.d/default.conf.template CONF=/etc/nginx/conf.d/default.conf echo "[convivo] Proxying Supabase paths to: ${TARGET}" sed "s|__SUPABASE_PROXY_TARGET__|${TARGET}|g" "${TEMPLATE}" > "${CONF}" # Run nginx in the foreground. exec nginx -g "daemon off;"