Skip to content

Commit

Permalink
fix: require NEXT_PUBLIC variables in build step
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar Zunic committed Sep 28, 2023
1 parent 456b66f commit bce4ace
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV NEXT_TELEMETRY_DISABLED 1

ENV NEXT_PUBLIC_AXIOM_TOKEN $NEXT_PUBLIC_AXIOM_TOKEN
ENV NEXT_PUBLIC_AXIOM_DATASET $NEXT_PUBLIC_AXIOM_DATASET
ENV NEXT_PUBLIC_DISCORD_CLIENT_ID $NEXT_PUBLIC_DISCORD_CLIENT_ID

RUN npx prisma generate
RUN SKIP_ENV_VALIDATION=1 npm run build

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
ports:
- "3306:3306"
web:
build: .
image: ll
ports:
- "3000:3000"
env_file:
Expand Down
2 changes: 0 additions & 2 deletions env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,4 @@ const env = createEnv({
skipValidation: process.env.SKIP_ENV_VALIDATION === '1',
});

console.log(process.env.SKIP_ENV_VALIDATION);

export default env;

0 comments on commit bce4ace

Please sign in to comment.