Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM node:18-slim

# Create app directory
WORKDIR /usr/src/app

# Install dependencies (use npm ci when lockfile present, otherwise npm install)
COPY package.json package-lock.json* ./
RUN if [ -f package-lock.json ]; then \
npm ci --only=production; \
else \
npm install --only=production; \
fi

# Copy application source
COPY . .

# Set production environment
ENV NODE_ENV=production

# Use unprivileged user (node image provides 'node')
USER node

# The app listens on this port by default; can be overridden with $PORT
EXPOSE 8079

# Start the app using the package.json start script
CMD ["npm", "start"]