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({
930
930
931
931
// CLI package tag (e.g. "latest", "v4-beta", "4.0.0") - used for setup commands
932
932
TRIGGER_CLI_TAG : z . string ( ) . default ( "latest" ) ,
933
+
934
+ HEALTHCHECK_DATABASE_DISABLED : z . string ( ) . default ( "0" ) ,
933
935
} ) ;
934
936
935
937
export type Environment = z . infer < typeof EnvironmentSchema > ;
Original file line number Diff line number Diff line change 1
1
import { prisma } from "~/db.server" ;
2
2
import type { LoaderFunction } from "@remix-run/node" ;
3
+ import { env } from "~/env.server" ;
3
4
4
5
export const loader : LoaderFunction = async ( { request } ) => {
5
6
try {
7
+ if ( env . HEALTHCHECK_DATABASE_DISABLED === "1" ) {
8
+ return new Response ( "OK" ) ;
9
+ }
10
+
6
11
await prisma . $queryRaw `SELECT 1` ;
7
12
return new Response ( "OK" ) ;
8
13
} catch ( error : unknown ) {
You can’t perform that action at this time.
0 commit comments