/api added with docker
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
FROM node:14-alpine
|
||||
# Use the official Node.js image as the base image
|
||||
FROM node:latest
|
||||
|
||||
# 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 dependencies, including 'nodemon' for development
|
||||
RUN npm install
|
||||
|
||||
# Copy the rest of your application code
|
||||
COPY . .
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
# Expose the port your app runs on
|
||||
EXPOSE 3000
|
||||
|
||||
# Start the application using 'nodemon' for automatic reloading
|
||||
CMD ["npx", "nodemon", "server.js"]
|
||||
|
||||
Reference in New Issue
Block a user