Add new Frontend

This commit is contained in:
Urtzi Alfaro
2025-08-03 19:23:20 +02:00
parent 03e9dc6469
commit 376ce3ee0d
45 changed files with 5352 additions and 9230 deletions

View File

@@ -1,18 +1,32 @@
# Development Dockerfile
FROM node:18-alpine
# Install curl for healthchecks
RUN apk add --no-cache curl
# Set working directory
WORKDIR /app
# Copy package files
# Copy package files first (better caching)
COPY package*.json ./
# Install dependencies
# Install all dependencies (including dev dependencies)
RUN npm ci
# Copy application files
# Copy source code
COPY . .
# Expose port
# Create non-root user for security
RUN addgroup -g 1001 -S nodejs
RUN adduser -S reactjs -u 1001
USER reactjs
# Expose port 3000 (Vite default)
EXPOSE 3000
# Start development server
CMD ["npm", "run", "dev"]
# Add healthcheck
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD curl -f http://localhost:3000/ || exit 1
# Start development server with host binding
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]