mirror of
https://dev.azure.com/tstanciu94/ReverseProxy/_git/ReverseProxy_Frontend
synced 2025-10-03 16:49:04 +03:00
- feat: Add session management components and improve system overview - feat: Update dependencies and replace react-flags with react-country-flag - Update dependencies in package.json: reintroduce react-dom and upgrade redux to version 5.0.1 - refactor: update chatbot implementation and dependencies - refactor: migrate to Redux Toolkit and update dependencies - feat: enhance ReactCountryFlag component with SVG support - refactor: remove Bootstrap dependency and update Node engine requirement; add LabelValue component for better UI consistency - refactor: enhance LabelValue component usage in ServerSummary for improved readability and tooltip support - refactor: replace inline text with LabelValue component in ActiveSessionSummary and SessionSummary for improved consistency and readability - refactor: update components to use LabelValue for improved consistency and readability - refactor: optimize LabelValue component for improved readability and structure - refactor: improve code readability in SessionForwardsComponent by standardizing arrow function syntax and adjusting styling properties
51 lines
1.1 KiB
Docker
51 lines
1.1 KiB
Docker
# Modern Dockerfile for Vite + React application
|
|
# Build stage
|
|
FROM node:18-alpine as builder
|
|
|
|
WORKDIR /app
|
|
|
|
ARG OWN_NPM_TOKEN
|
|
# Copy npm config required for private registry access. Ensure the build context includes .npmrc.
|
|
COPY .npmrc .npmrc
|
|
# Copy package files
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies (include devDependencies for Vite build)
|
|
RUN npm ci
|
|
RUN rm -f .npmrc
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build the application
|
|
ARG VITE_BASE_PATH=""
|
|
ENV VITE_BASE_PATH=${VITE_BASE_PATH}
|
|
RUN npm run build
|
|
|
|
# Production stage - Use nginx for better performance
|
|
FROM nginx:alpine
|
|
|
|
# Remove default nginx website
|
|
RUN rm -rf /usr/share/nginx/html/*
|
|
|
|
# Copy built application
|
|
COPY --from=builder /app/build /usr/share/nginx/html
|
|
|
|
# Copy nginx configuration
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
# Add environment variables
|
|
ENV Author="Tudor Stanciu"
|
|
ARG APP_VERSION=0.0.0
|
|
ENV APP_VERSION=${APP_VERSION}
|
|
|
|
# Expose port 80
|
|
EXPOSE 80
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=120s --timeout=10s --start-period=60s --retries=3 \
|
|
CMD wget -q -O - http://localhost/ || exit 1
|
|
|
|
# Start nginx
|
|
CMD ["nginx", "-g", "daemon off;"]
|