forked from piyushyadav1617/auth_frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (32 loc) · 926 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Use an official Node.js runtime as the base image
FROM node:18-alpine
# Set the working directory inside the container
WORKDIR /usr/src/app
# Copy package.json and package-lock.json to the container
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application code to the container
COPY . .
ARG NEXTAUTH_SECRET
ARG NEXTAUTH_URL
ARG ACCESS_KEY_ID
ARG S3_BUCKET
ARG S3_REGION
ARG SECRET_ACCESS_KEY
ARG NEXT_PUBLIC_AES_KEY
ARG NEXT_PUBLIC_CS_CAPTCHA_SECRET
ENV PORT=3000
ENV NEXTAUTH_SECRET=$NEXTAUTH_SECRET
ENV NEXTAUTH_URL=$NEXTAUTH_URL
ENV _ACCESS_KEY_ID=$ACCESS_KEY_ID
ENV _S3_BUCKET=$S3_BUCKET
ENV _S3_REGION=$S3_REGION
ENV _SECRET_ACCESS_KEY=$SECRET_ACCESS_KEY
ENV NEXT_PUBLIC_AES_KEY=$NEXT_PUBLIC_AES_KEY
ENV NEXT_PUBLIC_CS_CAPTCHA_SECRET=$NEXT_PUBLIC_CS_CAPTCHA_SECRET
RUN npm i sharp
RUN npm run build
EXPOSE 3000
# Start the Next.js application using npm start
CMD ["npm", "start"]