Skip to content

Commit

Permalink
🔧 Skip env validation during docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
lukevella committed Jul 5, 2024
1 parent 104d214 commit b631d07
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ENV NEXT_PUBLIC_APP_VERSION=$APP_VERSION
ARG SELF_HOSTED
ENV NEXT_PUBLIC_SELF_HOSTED=$SELF_HOSTED

RUN yarn build
RUN SKIP_ENV_VALIDATION=1 yarn build

FROM node:20 AS runner

Expand Down
1 change: 1 addition & 0 deletions apps/web/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,5 @@ export const env = createEnv({
NEXT_PUBLIC_POSTHOG_API_KEY: process.env.NEXT_PUBLIC_POSTHOG_API_KEY,
NEXT_PUBLIC_POSTHOG_API_HOST: process.env.NEXT_PUBLIC_POSTHOG_API_HOST,
},
skipValidation: !!process.env.SKIP_ENV_VALIDATION,
});
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"SENTRY_AUTH_TOKEN",
"SENTRY_DSN",
"SENTRY_IGNORE_API_RESOLUTION_ERROR",
"SKIP_ENV_VALIDATION",
"SMTP_HOST",
"SMTP_PORT",
"SMTP_PWD",
Expand Down

0 comments on commit b631d07

Please sign in to comment.