Template
CI reads Infisical staging as the read-only convexmonorepo-ci machine identity, deploys the Convex functions, builds and pushes the image, and asks the VPS to redeploy. Payload schema changes now ship as migrations that production runs on startup; the baseline matches the production schema and is recorded as applied there. The local stack moves to its own ports and syncs the Convex runtime env, and the scripts pick up Infisical account switching, dev-kill and a cache-safe CI install.
24 lines
617 B
Bash
Executable File
24 lines
617 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -eu
|
|
|
|
ROOT_DIR="$(cd -- "$(dirname -- "$0")/.." && pwd)"
|
|
|
|
if [ -n "${SENTRY_AUTH_TOKEN:-}" ] &&
|
|
[ -n "${NEXT_PUBLIC_SENTRY_URL:-}" ] &&
|
|
! curl \
|
|
--connect-timeout 3 \
|
|
--max-time 10 \
|
|
--silent \
|
|
--show-error \
|
|
--output /dev/null \
|
|
"${NEXT_PUBLIC_SENTRY_URL%/}/api/0/"; then
|
|
echo "Sentry is unreachable; continuing without source-map upload." >&2
|
|
SENTRY_AUTH_TOKEN=""
|
|
SKIP_ENV_VALIDATION=true
|
|
NEXT_PUBLIC_SENTRY_URL="http://127.0.0.1:9"
|
|
export NEXT_PUBLIC_SENTRY_URL SENTRY_AUTH_TOKEN SKIP_ENV_VALIDATION
|
|
fi
|
|
|
|
cd "$ROOT_DIR/apps/next"
|
|
exec bun run build:docker
|