This repository has been archived on 2026-02-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
serengo/Dockerfile

43 lines
729 B
Docker

# Use Node.js 18 alpine as base image
FROM node:18-alpine AS base
# Set working directory
WORKDIR /app
# Copy package files
COPY package.json ./
# Install dependencies
RUN npm install
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Production stage
FROM node:18-alpine AS production
WORKDIR /app
# Copy package files
COPY package.json ./
# Install only production dependencies
RUN npm install --only=production
# Copy built application from build stage
COPY --from=base /app/build ./build
COPY --from=base /app/static ./static
COPY --from=base /app/package.json ./
# Expose port
EXPOSE 3000
# Set environment
ENV NODE_ENV=production
ENV PORT=3000
# Start the application
CMD ["node", "build"]