File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -930,6 +930,8 @@ const EnvironmentSchema = z.object({
930930
931931 // CLI package tag (e.g. "latest", "v4-beta", "4.0.0") - used for setup commands
932932 TRIGGER_CLI_TAG : z . string ( ) . default ( "latest" ) ,
933+
934+ HEALTHCHECK_DATABASE_DISABLED : z . string ( ) . default ( "0" ) ,
933935} ) ;
934936
935937export type Environment = z . infer < typeof EnvironmentSchema > ;
Original file line number Diff line number Diff line change 11import { prisma } from "~/db.server" ;
22import type { LoaderFunction } from "@remix-run/node" ;
3+ import { env } from "~/env.server" ;
34
45export const loader : LoaderFunction = async ( { request } ) => {
56 try {
7+ if ( env . HEALTHCHECK_DATABASE_DISABLED === "1" ) {
8+ return new Response ( "OK" ) ;
9+ }
10+
611 await prisma . $queryRaw `SELECT 1` ;
712 return new Response ( "OK" ) ;
813 } catch ( error : unknown ) {
You can’t perform that action at this time.
0 commit comments