51 lines
2.8 KiB
Markdown
51 lines
2.8 KiB
Markdown
# Deploy MineGeo
|
|
|
|
Run `npm run deploy` from the project directory. The script collects all web
|
|
source files and public assets, uploads them in one request, waits for the build,
|
|
and prints the deployment URL. It uses the [Vercel deployments API](https://vercel.com/docs/rest-api/deployments/create-a-new-deployment). The database credentials already configured in
|
|
Vercel remain there. Mod captures are processed by the deployed Vercel API:
|
|
upload finalization starts background image processing with Next.js `after`,
|
|
and the authenticated dashboard resumes queued or expired jobs. The function
|
|
has a 300-second limit and uses the existing Supabase queue, Storage buckets,
|
|
retry count, and completion transaction. It processes one PNG at a time in
|
|
memory, so it needs no local capture directory or running Minecraft client.
|
|
|
|
Plugin terrain exports still require the standalone Minecraft rendering worker
|
|
on its current host. That renderer builds panoramas with Chromium and vanilla
|
|
Minecraft assets; it is separate from the deployed mod-image processor.
|
|
|
|
The script excludes Git metadata, local environment files, caches, generated
|
|
captures, tests, Java build sources, and development tools. It checks uploaded
|
|
content, including the downloadable JARs, for references to the Git server.
|
|
Nothing is pushed to Gitea or connected to a Git provider.
|
|
|
|
Authentication is needed once: run `vercel login`, or put a Vercel token in the
|
|
ignored `.env.deploy.local` file as `VERCEL_TOKEN=...`. The Codex Vercel plugin's
|
|
login does not sign the local script in. Tokens are never included in the upload
|
|
or command output.
|
|
|
|
Useful options:
|
|
|
|
- `npm run deploy -- --dry-run`: inspect file count and the privacy check without uploading.
|
|
- `npm run deploy -- --preview`: create a preview deployment.
|
|
- `npm run deploy -- --help`: show usage.
|
|
|
|
Vercel Web Analytics is included in the root layout through
|
|
`@vercel/analytics/next`, so page views and client-side navigation are tracked
|
|
across the site. Enable Web Analytics in the MineGeo project's Analytics tab
|
|
before deploying. After deployment, visit the site and navigate between pages
|
|
to verify collection. Content blockers can prevent analytics requests.
|
|
|
|
Analytics uses the existing Vercel project and requires no Git connection or
|
|
additional Supabase credentials.
|
|
|
|
Multiplayer uses the Supabase migration described in [multiplayer.md](multiplayer.md).
|
|
Apply that migration to a new database before deploying the multiplayer web files.
|
|
|
|
Map ZIP sharing requires `20261007145000_map_sharing.sql`. Imported maps stay
|
|
private and can be played without moderation; publication is blocked. See
|
|
[map-sharing.md](map-sharing.md) for the archive format and verification.
|
|
|
|
The script targets the existing MineGeo project. Set `VERCEL_PROJECT_ID` and
|
|
`VERCEL_ORG_ID` to deploy a copy to another Vercel project.
|