From ca8c12ca6f018db2e3dce3ebbbc11ca187681077 Mon Sep 17 00:00:00 2001 From: Nicolas Drolet Date: Tue, 28 Oct 2025 14:45:06 -0400 Subject: [PATCH] feat(docker): add dockerfile for dockerization of backend in lab Should be in 10.100.251.2 --- Dockerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..840a33b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +# Use the official Node.js image as the base image +FROM node:22 + +# Set the working directory inside the container +WORKDIR /usr/apptargo2/src/app + +# Copy package.json and package-lock.json to the working directory +COPY package*.json ./ + +# Install the application dependencies +RUN npm install + +# Copy the rest of the application files +COPY . . + +# Generate Prisma client +RUN npx prisma generate + +# Build the NestJS application +RUN npm run build + +# Expose the application port +EXPOSE 3000 + +# Command to run the application +CMD ["node", "dist/main"]