Deploy on DigitalOcean App Platform (GitHub-source build) + consolidate audit-fixes
Deploy config: - .do/app.yaml: build the Dockerfile directly from GitHub (deploy_on_push) instead of a pre-built DOCR image; NEXT_PUBLIC_* set RUN_AND_BUILD_TIME with the propertymanagement.network domain so they bake into the client bundle; add custom domains block (apex + www); wire Sentry DSN (server + browser). Included pending work from the audit-fixes branch: - AI provider abstraction (OpenAI/Anthropic, admin-selectable; Anthropic default) - Per-landlord e-signature (DocuSign OAuth + Dropbox Sign) + migration 0010 - Outbound webhooks / Zapier integration - PayPal removal (Stripe-only billing) - Storage hardening (fail-loud when Spaces unconfigured), security fixes Verified: full production Docker build (same build-args as DO) passes clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
917a06ee85
commit
5495b94924
+23
-4
@@ -1,8 +1,19 @@
|
||||
// Next.js instrumentation hook — runs once when the server process starts.
|
||||
// Surfaces "silently disabled" integrations at boot so a misconfigured deploy is
|
||||
// obvious in the logs instead of failing quietly at runtime.
|
||||
export function register() {
|
||||
// Only run in the Node.js server runtime (not edge/middleware) and only in prod.
|
||||
// (1) Initializes Sentry for the active runtime, and (2) surfaces "silently
|
||||
// disabled" integrations at boot so a misconfigured deploy is obvious in the
|
||||
// logs instead of failing quietly at runtime.
|
||||
import * as Sentry from "@sentry/nextjs"
|
||||
|
||||
export async function register() {
|
||||
// Initialize Sentry for whichever server runtime is booting.
|
||||
if (process.env.NEXT_RUNTIME === "nodejs") {
|
||||
await import("./sentry.server.config")
|
||||
}
|
||||
if (process.env.NEXT_RUNTIME === "edge") {
|
||||
await import("./sentry.edge.config")
|
||||
}
|
||||
|
||||
// --- Startup env warnings (Node.js server runtime, production only) ---
|
||||
if (process.env.NEXT_RUNTIME !== "nodejs") return
|
||||
if (process.env.NODE_ENV !== "production") return
|
||||
|
||||
@@ -33,4 +44,12 @@ export function register() {
|
||||
if (!process.env.OPENAI_API_KEY) {
|
||||
warn("OPENAI_API_KEY is NOT set — AI features will error when called.")
|
||||
}
|
||||
|
||||
if (!process.env.SENTRY_DSN && !process.env.NEXT_PUBLIC_SENTRY_DSN) {
|
||||
warn("SENTRY DSN is NOT set — error monitoring is disabled (no crash reports).")
|
||||
}
|
||||
}
|
||||
|
||||
// Capture errors thrown in nested React Server Components, route handlers, and
|
||||
// server actions and report them to Sentry.
|
||||
export const onRequestError = Sentry.captureRequestError
|
||||
|
||||
Reference in New Issue
Block a user