Add agent workflows & stuff
This commit is contained in:
@@ -62,24 +62,4 @@ fi
|
||||
info "Deploying Convex schema and functions"
|
||||
(cd "$ROOT_DIR/packages/backend" && bun run setup)
|
||||
|
||||
convex_env_names="$(
|
||||
sh "$ROOT_DIR/scripts/with-env" dev -- bash -c \
|
||||
'cd packages/backend && bunx convex env list' 2>/dev/null \
|
||||
| sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p'
|
||||
)"
|
||||
if ! printf '%s\n' "$convex_env_names" | grep -qx 'JWT_PRIVATE_KEY' \
|
||||
|| ! printf '%s\n' "$convex_env_names" | grep -qx 'JWKS' \
|
||||
|| ! printf '%s\n' "$convex_env_names" | grep -qx 'SITE_URL'; then
|
||||
info "Configuring local Convex Auth keys"
|
||||
auth_keys="$(node "$ROOT_DIR/scripts/generate-convex-auth-keys.mjs")"
|
||||
jwt="$(printf '%s\n' "$auth_keys" | sed -n 's/^JWT_PRIVATE_KEY="\(.*\)"$/\1/p')"
|
||||
jwks="$(printf '%s\n' "$auth_keys" | sed -n 's/^JWKS=//p')"
|
||||
JWT_VAL="$jwt" JWKS_VAL="$jwks" sh "$ROOT_DIR/scripts/with-env" dev -- bash -c '
|
||||
cd packages/backend
|
||||
bunx convex env set "JWT_PRIVATE_KEY=$JWT_VAL" >/dev/null
|
||||
bunx convex env set "JWKS=$JWKS_VAL" >/dev/null
|
||||
bunx convex env set "SITE_URL=http://localhost:3000" >/dev/null
|
||||
'
|
||||
fi
|
||||
|
||||
printf '\nLocal stack ready:\n App: http://localhost:3000\n Convex: http://localhost:%s\n Dashboard: http://localhost:%s\n Postgres: localhost:%s\n' "${BACKEND_PORT:-3210}" "${DASHBOARD_PORT:-6791}" "${POSTGRES_PORT:-5432}"
|
||||
|
||||
Reference in New Issue
Block a user