Skip to content

Commit

Permalink
Refactor Dockerfile to include environment variables for authenticati…
Browse files Browse the repository at this point in the history
…on and database configuration
  • Loading branch information
rabilrbl committed Apr 17, 2024
1 parent f7fde94 commit 2db7f4a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ COPY . .

ENV NEXT_TELEMETRY_DISABLED 1

# Dummy values for the environment variables
ENV AUTH_SECRET="adf"
ENV AUTH_GOOGLE_ID="adf"
ENV AUTH_GOOGLE_SECRET="adf"
ENV DATABASE_URL="postgres://user:password@db:5432/test_db"
ENV RAZORPAY_KEY="adf"
ENV RAZORPAY_SECRET="adf"

RUN npx prisma generate

RUN npm run build
Expand All @@ -24,14 +32,6 @@ WORKDIR /app
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1

# Dummy values for the environment variables
ENV AUTH_SECRET="adf"
ENV AUTH_GOOGLE_ID="adf"
ENV AUTH_GOOGLE_SECRET="adf"
ENV DATABASE_URL="postgres://user:password@db:5432/test_db"
ENV RAZORPAY_KEY="adf"
ENV RAZORPAY_SECRET="adf"

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

Expand Down

0 comments on commit 2db7f4a

Please sign in to comment.