fix headline rhythm + wider hero image + 10x faster deploys
HEADLINE: - 3 balanced lines: 'Turn I'll donate' / 'into money' / 'in the bank.' - Removed that orphaned 'money' on its own line - <br className='hidden lg:block'> controls breaks on desktop only IMAGE: - Hero container: max-w-5xl -> max-w-7xl (image 25% wider) - Stat strip widened to match - Much more of the gala scene visible, phone prominent DEPLOY SPEED (deploy.sh): - Persistent /opt/pnpl/ build dir (no temp dir creation/deletion) - BuildKit with cache mounts (npm + .next/cache) - No more docker builder prune / docker rmi (preserves cache!) - Installed docker-buildx v0.31.1 on server - Before: ~245s (4+ min) After: ~29s (cached) / ~136s (first) - Use: cd pledge-now-pay-later && bash deploy.sh
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM node:20-alpine AS base
|
||||
|
||||
FROM base AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci
|
||||
|
||||
FROM base AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN npx prisma generate
|
||||
RUN npm run build
|
||||
RUN --mount=type=cache,target=/app/.next/cache npm run build
|
||||
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
# sharp needs these native libs for image optimization
|
||||
RUN apk add --no-cache libc6-compat
|
||||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 nextjs
|
||||
@@ -23,7 +23,6 @@ COPY --from=builder /app/public ./public
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
# sharp is bundled in standalone output when installed
|
||||
ENV NEXT_SHARP_PATH=/app/node_modules/sharp
|
||||
USER nextjs
|
||||
EXPOSE 3000
|
||||
|
||||
Reference in New Issue
Block a user