The script runs `npm run build`, creates `deploy-packages/<timestamp>-deploy-nopublic-noenv/eversoloweb-deploy-nopublic-noenv-<timestamp>.tar.gz`, and writes a matching `manifest.txt`.
The archive intentionally excludes:
-`public/`
- upload/data directories that are deployed separately: `media/`, `files/`, and `videos/`
-`.env`, `.env.*`, and `.env.example`
-`node_modules/`
-`.git/`
-`deploy-packages/`
-`.next/cache/` and `.next-dev/`
- macOS metadata inside the archive, such as `._*`, `.DS_Store`, and `__MACOSX`
- common local logs, cache folders, test output, and temporary files
On APFS, macOS may still attach `com.apple.provenance` to the outer `.tar.gz` file even after `xattr -c`. The script prints that as a warning, but still fails if Apple metadata appears inside the archive contents.
`NEXT_PUBLIC_SITE_URL` must be the final public origin when the package is built. Do not build a deployment package with `localhost`, because sitemap, robots, canonical URLs, and metadata can be generated from this value.
If the build has already been run with the correct public URL and only the tarball needs to be recreated:
- Do not run `PAYLOAD_DB_PUSH=true` against production.
- Do not rely on application startup to run migrations. Use the explicit migration step.
- Before exporting a local database for production, confirm `payload_migrations` has no `batch = -1` dev marker. That marker means schema push history is still recorded and production migration commands can prompt interactively.
- Do not edit migrations after they have shipped to production. Add a new forward migration instead.
- Keep schema migrations and data backfills separate. Backfill scripts in `src/scripts/` are manual operational tools, not automatic boot steps.
- The deployed database and upload directories must come from the same local export, otherwise media/video/file relationships can point at missing files.
- Admin login captcha is stateless and signed with `PAYLOAD_SECRET`; changing that secret invalidates existing login sessions and outstanding captcha tokens.