Coastal Timesheet v2 — full feature buildout

Features:
- Copy Previous Week (entries duplication)
- Bulk Approve/Reject (admin workflow)
- Overtime tracking (employee + admin views)
- DayCard component with auto-save
- PDF generation, email notifications
- React + Tailwind frontend, Prisma + PostgreSQL backend
- Docker deployment (3 containers)
This commit is contained in:
BizzleBot
2026-02-16 10:01:39 +00:00
commit f718a76153
65 changed files with 6756 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
# ───────────────────────────────────────────────────
# Coastal Timesheet — Frontend Dockerfile
# Build: Node 22 Alpine → Serve: Nginx Alpine
# ───────────────────────────────────────────────────
# ── Stage 1: Install dependencies ──────────────────
FROM node:22-alpine AS deps
WORKDIR /app
# Copy package files (frontend lives in the frontend/ directory)
COPY frontend/package.json frontend/package-lock.json* ./
# Install all dependencies (including devDependencies for build)
RUN npm ci 2>/dev/null || npm install
# ── Stage 2: Build ────────────────────────────────
FROM node:22-alpine AS builder
WORKDIR /app
# Copy dependencies
COPY --from=deps /app/node_modules ./node_modules
# Copy frontend source
COPY frontend/ ./
# Set API URL for production build
ARG VITE_API_URL=/api
ENV VITE_API_URL=${VITE_API_URL}
# Build the React app
RUN npm run build
# ── Stage 3: Serve with Nginx ─────────────────────
FROM nginx:1.27-alpine AS runner
# Remove default nginx config and static files
RUN rm -rf /etc/nginx/conf.d/default.conf /usr/share/nginx/html/*
# Copy built frontend assets
COPY --from=builder /app/dist /usr/share/nginx/html
# The nginx config is mounted via docker-compose volume
# but we include a fallback in case it's run standalone
COPY docker/nginx/default.conf /etc/nginx/conf.d/default.conf
# Expose ports
EXPOSE 80 443
# Nginx runs as non-root by default in alpine image
# Health check
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:80/ || exit 1
CMD ["nginx", "-g", "daemon off;"]