Files
Archive/retro/cool-ui/Dockerfile

36 lines
679 B
Docker
Raw Normal View History

2025-12-09 06:52:43 +00:00
FROM node:20-alpine AS builder
# Set working directory
WORKDIR /app
# Copy package files
COPY Nitro-Cool-UI/package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY Nitro-Cool-UI/ .
# Build application
RUN npm run build
# Production stage
FROM nginx:alpine
# Copy built files from builder
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy nginx configuration
COPY cool-ui/nginx.conf /etc/nginx/conf.d/default.conf
# Expose port
EXPOSE 80
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost/ || exit 1
# Start nginx
CMD ["nginx", "-g", "daemon off;"]