Untitled

mail@pastecode.io avatar
unknown
plain_text
10 days ago
551 B
1
Indexable
Never
# Use the official Node.js image based on Alpine
FROM node:alpine

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy package.json and package-lock.json (if available)
COPY package*.json ./

# Install dependencies
RUN npm install

# If you're building your code for production
# RUN npm ci --only=production

# Copy the rest of your application code
COPY . .

# Copy the .env file
COPY .env .env

# Expose the port your app runs on
EXPOSE 3000

# Command to run your app
CMD [ "node", "src/index.js" ]
Leave a Comment