Server/Dockerfile
M1000fr 3301b365f9 feat: Add Docker configuration files
Add .dockerignore, Dockerfile, and docker-compose.yml files to configure Docker for the project.
2024-12-02 14:37:58 +01:00

26 lines
558 B
Docker

# Use the official Node.js image as the base image
FROM node:20
# Set the working directory inside the container
WORKDIR /usr/src/app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
# Install the application dependencies
RUN yarn install
# Copy the rest of the application files
COPY . .
# Generate Prisma client
RUN yarn prisma generate
# Build the NestJS application
RUN yarn build
# Expose the application port
EXPOSE 3000
# Command to run the application
CMD ["node", "dist/main"]