Update SKIP_REDIS environment variable handling to use string comparison
This commit is contained in:
parent
8504fcd1cc
commit
61e1d3246d
4 changed files with 5 additions and 5 deletions
|
|
@ -62,7 +62,7 @@ ENV KEYDB_URL=$KEYDB_URL
|
|||
ARG TILES_URL
|
||||
ENV TILES_URL=$TILES_URL
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV SKIP_REDIS=1
|
||||
ENV SKIP_REDIS="true"
|
||||
|
||||
RUN SKIP_ENV_VALIDATION=1 npm run build
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ ENV KEYDB_URL=$KEYDB_URL
|
|||
ARG TILES_URL
|
||||
ENV TILES_URL=$TILES_URL
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV SKIP_REDIS=0
|
||||
ENV SKIP_REDIS="false"
|
||||
|
||||
RUN addgroup -g 1001 -S nodejs
|
||||
RUN adduser -S nextjs -u 1001
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const server = z.object({
|
|||
TILES_URL: z.string(),
|
||||
KEYDB_URL: z.string(),
|
||||
JWT_SECRET: z.string(),
|
||||
SKIP_REDIS: z.coerce.boolean(),
|
||||
SKIP_REDIS: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { env } from "~/env.mjs";
|
|||
let tiles: Redis | null = null;
|
||||
|
||||
export function getTilesClient() {
|
||||
if (env.SKIP_REDIS) {
|
||||
if (env.SKIP_REDIS === "true") {
|
||||
return null;
|
||||
}
|
||||
if (!tiles) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { env } from "~/env.mjs";
|
|||
let keydb: Redis | null = null;
|
||||
|
||||
export function getKeydbClient() {
|
||||
if (env.SKIP_REDIS) {
|
||||
if (env.SKIP_REDIS === "true") {
|
||||
return null;
|
||||
}
|
||||
if (!keydb) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue