mirror of
https://github.com/StepanovPlaton/Chat.git
synced 2026-04-03 12:20:40 +04:00
Complete setup for docker. Add readme, and fix some bugs
This commit is contained in:
23
backend/Dockerfile
Normal file
23
backend/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
# 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 npm install
|
||||
|
||||
# Copy the rest of the application files
|
||||
COPY . .
|
||||
|
||||
# Build the NestJS application
|
||||
RUN npm run build
|
||||
|
||||
# Expose the application port
|
||||
# EXPOSE 3000
|
||||
|
||||
# Command to run the application
|
||||
CMD ["node", "dist/main"]
|
||||
Reference in New Issue
Block a user