build(docker): create and populate dockerfile
This commit is contained in:
parent
bafb997fa6
commit
db60f11f6e
|
@ -0,0 +1,20 @@
|
|||
# Use an official Node.js runtime as a parent image
|
||||
FROM node:18-alpine
|
||||
|
||||
# Set working directory inside the container
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copy package.json and package-lock.json for installing dependencies
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install --production
|
||||
|
||||
# Copy the rest of the project files
|
||||
COPY . .
|
||||
|
||||
# Expose the port your application runs on (if applicable)
|
||||
EXPOSE 3002
|
||||
|
||||
# Command to run the application
|
||||
CMD ["node", "src/server.js"]
|
Loading…
Reference in New Issue