Add full PWA support (icons, manifest, service worker, pwa lib and bridge) and introduce install/offline UI. Generate app icons via a new scripts/generate-icons.js and include multiple icon sizes in public/icons; update manifest and layout head meta/preconnect. Revamp global styles (globals.css) with new utilities, animations, spacing for bottom nav, card shadows, skeletons and accessibility tweaks. Polish major screens (login, collections, map, settings) with improved headers, loading states, touch/press feedback, and layout adjustments; add new components (InstallPrompt, OfflineIndicator, PWABridge) and update various components to match new visual/UX patterns. Update Dockerfile to generate icons and use Next.js static export output (/out) for nginx, and bump package setup to support icon generation.
38 lines
No EOL
878 B
Docker
38 lines
No EOL
878 B
Docker
# Multi-stage build for Next.js static export
|
|
# Stage 1: Build the app
|
|
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies (including sharp for icon generation)
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build argument for PocketBase URL
|
|
ARG NEXT_PUBLIC_POCKETBASE_URL
|
|
ENV NEXT_PUBLIC_POCKETBASE_URL=${NEXT_PUBLIC_POCKETBASE_URL}
|
|
|
|
# Generate PWA icons
|
|
RUN node scripts/generate-icons.js
|
|
|
|
# Build the static export (sets NEXT_EXPORT=true)
|
|
RUN npm run export
|
|
|
|
# Stage 2: Serve with nginx
|
|
FROM nginx:alpine
|
|
|
|
# Remove default nginx static assets
|
|
RUN rm -rf /usr/share/nginx/html/*
|
|
|
|
# Copy built static files from builder (Next.js export outputs to /out)
|
|
COPY --from=builder /app/out /usr/share/nginx/html
|
|
|
|
# Copy custom nginx config
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"] |