25 lines
345 B
Docker
25 lines
345 B
Docker
# Use Node.js Alpine for smaller image
|
|
FROM node:18-alpine
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package*.json ./
|
|
|
|
# Copy your project-specific .npmrc
|
|
#COPY .npmrc ./
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Copy the rest of the app
|
|
COPY . .
|
|
|
|
# Expose port
|
|
EXPOSE 3000
|
|
|
|
# Run the app
|
|
CMD ["node", "src/server.mjs"]
|
|
|