Musicsitetest / Dockerfile
riddhiman's picture
Update Dockerfile
cdfbce6 verified
raw
history blame
562 Bytes
# Use an official Node runtime as a parent image
FROM node:20
# Set the working directory in the container
WORKDIR /usr/src/app
# Copy package.json and package-lock.json (or npm-shrinkwrap.json) files
COPY package*.json ./
# Install any needed packages specified in package.json
RUN npm install
# Bundle the app's source code inside the Docker image
COPY . .
# Make port 3000 available to the world outside this container
EXPOSE 7860
# Define environment variable
ENV NODE_ENV=production
# Run the app when the container launches
CMD ["node", "server.js"]