From bce4aced465a377b97f81965898c1f55886d5c47 Mon Sep 17 00:00:00 2001 From: Omar Zunic Date: Thu, 28 Sep 2023 20:46:01 +0200 Subject: [PATCH] fix: require NEXT_PUBLIC variables in build step --- Dockerfile | 4 ++++ docker-compose.yml | 2 +- env.ts | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5787957..a334bae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index d063e34..0322de7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: ports: - "3306:3306" web: - build: . + image: ll ports: - "3000:3000" env_file: diff --git a/env.ts b/env.ts index 6156c63..0e63a54 100644 --- a/env.ts +++ b/env.ts @@ -62,6 +62,4 @@ const env = createEnv({ skipValidation: process.env.SKIP_ENV_VALIDATION === '1', }); -console.log(process.env.SKIP_ENV_VALIDATION); - export default env;