From dccede28c17686877e76a78375bd08301e3468b4 Mon Sep 17 00:00:00 2001 From: Dex Burgess Date: Fri, 16 Aug 2024 02:30:56 +0000 Subject: [PATCH] Update Dockerfile --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9935294..42713ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Install dependencies only when needed -FROM node:18-alpine3.19 AS deps +FROM node:20-alpine AS deps RUN apk add --no-cache libc6-compat WORKDIR /app COPY package.json yarn.lock ./ @@ -7,7 +7,7 @@ RUN yarn config set network-timeout 100000 RUN yarn install # Rebuild the source code only when needed -FROM node:18-alpine3.19 AS builder +FROM node:20-alpine AS builder WORKDIR /app @@ -18,7 +18,7 @@ COPY . . RUN yarn build # Production image, copy all the files and run next -FROM node:18-alpine3.19 AS runner +FROM node:20-alpine AS runner WORKDIR /app ENV NODE_ENV production @@ -40,5 +40,9 @@ EXPOSE 3000 ENV PORT 3000 ENV HOSTNAME "0.0.0.0" +ENV NEXT_PUBLIC_SENDGRID_API_KEY=$NEXT_PUBLIC_SENDGRID_API_KEY +ENV NEXT_PUBLIC_RECAPTCHA_SITE_KEY=$NEXT_PUBLIC_RECAPTCHA_SITE_KEY +ENV NEXT_PUBLIC_RECAPTCHA_SECRET_KEY=$NEXT_PUBLIC_RECAPTCHA_SECRET_KEY + CMD ["node", "server.js"]