Adding docker support

This commit is contained in:
Adolfo Reyna
2024-10-18 11:59:15 -04:00
parent e52c379a55
commit aac7080f7f
5 changed files with 55 additions and 3 deletions

View File

@@ -8,10 +8,12 @@ RUN apk add --no-cache python3 make g++
WORKDIR /app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
COPY ["package.json", "package-lock.json", "./"]
# Install dependencies
RUN npm install
RUN npm rebuild bcrypt
RUN npm install nodemon -g
# Copy the rest of the application source code
COPY . .
@@ -20,7 +22,7 @@ COPY . .
EXPOSE 3001
# Command to run your app
CMD ["npm", "start"]
CMD ["nodemon"]
# sudo docker build -t emi-backend .
# sudo docker run -d -p 4000:5000 -e PORT=5000 emi-backend