Adding docker support
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user