DevOps and DX consolidation pass. Dockerfile (production): - Replaced 'COPY . .' at the builder stage with explicit copies of package.json, prisma/, src/, public/, and the config files. The original 'COPY . .' would ship .env (with live secrets) and the .next/ cache into the builder context; .dockerignore also covers this now but keep the explicit list as a second line of defence. - Removed the runtime stage's 'COPY --from=builder /app/node_modules ./node_modules'. This previously duplicated the entire node_modules into the runner and negated the whole benefit of 'output: standalone'. Now we copy only the Prisma generated client (.prisma + @prisma). Expected image size reduction: ~1GB. - Added a HEALTHCHECK polling GET /api/check-subdomain?slug=__health every 30s (the route already exists and is cheap). - Added wget for the health probe (alpine doesn't ship wget by default). .dockerignore (new): - Excludes .next/, .next_old/, .git/, docs/, nginx/, *.md, .env *, coverage, *.tsbuildinfo, tt.md, and the Docker/compose files themselves from the build context. CI (.github/workflows/ci.yml, new): - Runs on push and PR to main/admin. - Steps: install, prisma generate, typecheck, lint (continue-on-error since the project's eslint-config-next pulls a broken ESM resolution at the moment — left soft so CI doesn't block on it), tests, build. - Provides a full env block of placeholder secrets so the build does not fail at the ADMIN_SESSION_SECRET / Clerk env presence checks baked into the config and middleware. Repo cleanup: - Untracked .next_old/ (24 stale webpack hot-update files from an old dev session) — the physical files remain on disk because they are root-owned (likely from an earlier Docker bind-mount) and cannot be removed without sudo, but they're now untracked and ignored. - .gitignore: the bogus 'certbot/.next_old/' line is replaced with '/.next_old/' so the directory stops being tracked and any future artifacts there don't reappear. - Deleted nginx/conf.d/* (Traefik is the actual deploy per project decision). Traefik labels in docker-compose.yaml remain. App DX: - layout.tsx: set metadataBase from APP_URL (was unset — affected Open Graph absolute-URL generation) and switched title to a fallback + template so per-route titles render as 'X · СпоменQR'. - src/app/loading.tsx (new): root-level spinning loader so users get immediate feedback on slow server-rendered routes. - src/app/error.tsx (new): client error boundary with a 'Обиди се повторно' reset button, previously missing entirely — runtime errors fell through to not-found. package.json: 'typecheck' script added (for local use + CI). .gitignore cleanups: '/.next_old/' replaces the accidental 'certbot/.next_old/' glob. |
||
|---|---|---|
| .github/workflows | ||
| docs | ||
| prisma | ||
| public | ||
| scripts | ||
| src | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.dev.yaml | ||
| docker-compose.yaml | ||
| Dockerfile | ||
| Dockerfile.dev | ||
| eslint.config.mjs | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.mjs | ||
| tsconfig.json | ||
| vitest.config.ts | ||
This is a Next.js project bootstrapped with create-next-app.
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Deploy on Vercel
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.