Skip to content

Commit

Permalink
add env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
gregrickaby committed May 9, 2024
1 parent 3e4c6b7 commit 05cf3c9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Dockerfile
Expand Up @@ -8,6 +8,16 @@ RUN apk add --no-cache libc6-compat
# Create and change to the app directory.
WORKDIR /app

# Declare build arguments.
ARG REDDIT_CLIENT_ID
ARG REDDIT_CLIENT_SECRET

# Set environment variable.
ENV REDDIT_CLIENT_ID=$REDDIT_CLIENT_ID
ENV REDDIT_CLIENT_SECRET=$REDDIT_CLIENT_SECRET
ENV NEXT_TELEMETRY_DISABLED 1
ENV PORT 3000

# Install dependencies based on the preferred package manager.
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \
Expand All @@ -33,10 +43,6 @@ RUN chown nextjs:nodejs /app
# Copy local code to the container image.
COPY . .

# Set environment variables for production.
ENV NEXT_TELEMETRY_DISABLED 1
ENV PORT 3000

# Expose the port the app runs on.
EXPOSE 3000

Expand Down

0 comments on commit 05cf3c9

Please sign in to comment.