From 546d6fbba346cfe48720ac96cf286aecfbdbcb44 Mon Sep 17 00:00:00 2001 From: Andreas Knuth Date: Sat, 13 Jun 2026 15:41:15 -0500 Subject: [PATCH] docker + hero change --- .dockerignore | 22 ++++++++++++++++++++++ Dockerfile | 31 +++++++++++++++++++++++++++++++ app/globals.css | 8 ++++++-- docker-compose.yml | 20 ++++++++++++++++++++ next.config.mjs | 5 ++++- 5 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7e7b80b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,22 @@ +node_modules/ +.next/ +.git/ +.gitignore +Dockerfile +.dockerignore +.env +.env.* +npm-debug.log* +.env.example +docker-compose.yml +README.md +PLAN.md +PRODUCT.md +PROJECT_BRIEF.md +SHAPE_BRIEF.md +DESIGN.md +research/ +.DS_Store +Thumbs.db +.vscode/ +.idea/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4de66c2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +# ---- deps ---- +FROM node:22-alpine AS deps +WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm ci + +# ---- builder ---- +FROM node:22-alpine AS builder +WORKDIR /app +COPY --from=deps /app/node_modules ./node_modules +COPY . . +ENV NEXT_TELEMETRY_DISABLED=1 +RUN npm run build + +# ---- runner ---- +FROM node:22-alpine AS runner +WORKDIR /app +ENV NODE_ENV=production +ENV NEXT_TELEMETRY_DISABLED=1 +ENV PORT=3000 + +RUN addgroup --system --gid 1001 nodejs && \ + adduser --system --uid 1001 nextjs + +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 + +USER nextjs +EXPOSE 3000 +CMD ["node", "server.js"] diff --git a/app/globals.css b/app/globals.css index 80be431..74b5945 100644 --- a/app/globals.css +++ b/app/globals.css @@ -3593,8 +3593,12 @@ textarea::placeholder { } .hero-grid { - grid-template-columns: minmax(18rem, 0.55fr) minmax(43rem, 1.65fr); - gap: clamp(2.5rem, 4vw, 5rem); + gap: clamp(2.5rem, 4vw, 4rem); + } + + .architecture-panel { + max-width: 52rem; + margin-inline: auto; } .module-grid { diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0f1e9f6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +# docker compose up -d --build +# +# The host already runs Caddy as a reverse proxy. Caddy forwards requests +# to host.docker.internal:3000 (or localhost:3000 from the host side). +# On Linux, if host.docker.internal does not resolve inside the container, +# uncomment the extra_hosts line below so Caddy can reference it. +# +# Prerequisites: a .env file in the project directory with: +# SES_SMTP_USER= +# SES_SMTP_PASS= (SMTP credentials, not IAM access keys) +# SES_FROM_EMAIL= (must be an SES-verified identity) + +services: + web: + build: . + ports: + - "3000:3000" + env_file: + - .env + restart: unless-stopped diff --git a/next.config.mjs b/next.config.mjs index 4678774..e8ceb60 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,4 +1,7 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + output: "standalone", + outputFileTracingRoot: process.cwd(), +}; export default nextConfig;