From 8d68b6be2ee998e76dcf7adcb845bbf0136ba3ef Mon Sep 17 00:00:00 2001 From: Kristian Matthews-Kennington Date: Sun, 28 Jan 2024 23:42:44 +0000 Subject: [PATCH] Add Dockerfile for containerization --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..82bc1145 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +# Use the latest Node.js version as the base image +FROM node:latest + +# Set the working directory inside the container +WORKDIR /usr/src/app + +# Copy package.json and yarn.lock +COPY package.json yarn.lock ./ + +# Install dependencies using Yarn +RUN yarn install + +# Copy the rest of the project files +COPY . . + +# Build the Next.js project +RUN yarn build + +# Expose the port the app runs on +EXPOSE 3000 + +# Define the command to run the app +CMD ["yarn", "start"]