Skip to content

Commit

Permalink
feat: fix buildtime vs runtime env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dahal committed May 19, 2024
1 parent 5969034 commit 15b1b3e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ ARG UPLOAD_BUCKET_PRIVATE

# Set environment variables
ENV DOCKER_OUTPUT=1 \
NODE_ENV="production" \
BASE_URL=$BASE_URL \
SKIP_ENV_VALIDATION=1 \
NEXT_TELEMETRY_DISABLED=1 \
DATABASE_URL=$DATABASE_URL \
NEXTAUTH_SECRET=$NEXTAUTH_SECRET \
NEXTAUTH_URL=$BASE_URL \
NEXT_PUBLIC_BASE_URL=$BASE_URL \
NEXT_PUBLIC_NODE_ENV="production" \
EMAIL_SERVER=${EMAIL_SERVER} \
EMAIL_FROM=$EMAIL_FROM \
UPLOAD_PROVIDER="s3" \
Expand Down Expand Up @@ -68,6 +66,11 @@ RUN corepack enable pnpm && pnpm run build
FROM base AS runner
WORKDIR /app

# Set runtime environment variables
ENV NODE_ENV="production" \
NEXT_PUBLIC_NODE_ENV="production" \
NEXT_TELEMETRY_DISABLED=1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

Expand Down

0 comments on commit 15b1b3e

Please sign in to comment.