feat(docker): add dockerfile for dockerization of backend in lab
Should be in 10.100.251.2
This commit is contained in:
parent
488f0341cc
commit
ca8c12ca6f
26
Dockerfile
Normal file
26
Dockerfile
Normal file
|
|
@ -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"]
|
||||||
Loading…
Reference in New Issue
Block a user