Files
spore-website/Dockerfile
2025-10-14 13:53:30 +02:00

25 lines
501 B
Docker

# Build a small production image for the SPORE website
FROM node:20-alpine
# Set working directory
WORKDIR /app
# Install only production dependencies first (leverage build cache)
COPY package.json package-lock.json* ./
RUN npm ci --omit=dev || npm install --omit=dev
# Copy application files
COPY public ./public
COPY server.js ./server.js
# App runs on 3002 by default; allow override via PORT
ENV NODE_ENV=production \
PORT=3002
EXPOSE 3002
# Start the server
CMD ["node", "server.js"]