18 lines
340 B
Plaintext
18 lines
340 B
Plaintext
# Use official Node.js LTS image
|
|
FROM node:18
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy package files and install dependencies
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm install --production
|
|
|
|
# Copy the rest of the app
|
|
COPY . .
|
|
|
|
# Expose the port (default 3000)
|
|
EXPOSE 3000
|
|
|
|
# Start the server
|
|
CMD ["npm", "start"] |