Revert Vercel Deploy Button and deployment config#432
Revert Vercel Deploy Button and deployment config#432
Conversation
Co-authored-by: Alanaktion <236490+Alanaktion@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds initial support for one-click Vercel deployments by introducing Vercel configuration and a README deploy button.
Changes:
- Add
vercel.jsonto route requests through a PHP runtime. - Add a Vercel deploy button to
README.md. - Add
.vercelignoreto exclude local/Vercel-specific directories from uploads.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
vercel.json |
Defines the PHP runtime for index.php and a catch-all route to the front controller. |
README.md |
Adds a “Deploy with Vercel” button link. |
.vercelignore |
Ignores vendor/ and .vercel/ during Vercel uploads. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vercel.json
Outdated
| "routes": [ | ||
| { | ||
| "src": "/(.*)", | ||
| "dest": "/index.php" |
There was a problem hiding this comment.
The catch-all route sends every request (including /install.php and static assets like /css/*, /js/*) to index.php. This doesn’t match the current .htaccess behavior (which skips rewriting when the target is an existing file/dir) and will cause a redirect loop on fresh installs because index.php redirects to install.php when no config is present, but /install.php will also be routed back to index.php.
| "dest": "/index.php" | |
| "dest": "/index.php", | |
| "check": true |
README.md
Outdated
| [](https://github.com/Alanaktion/phproject/actions?query=workflow%3ACI) | ||
| [](https://crowdin.com/project/phproject) | ||
|
|
||
| [](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FAlanaktion%2Fphproject) |
There was a problem hiding this comment.
install.php writes config.php to the project root (file_put_contents("config.php", ...)), which generally won’t persist on Vercel’s serverless filesystem. As a result, the one-click Vercel deploy may not be usable without additional Vercel-specific setup (build-time config generation or env-based config support) and corresponding README guidance.
| [](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FAlanaktion%2Fphproject) | |
| > Note: This project’s installer writes a `config.php` file at runtime, which does not persist on Vercel’s serverless filesystem. One‑click Vercel deploys are therefore not supported out of the box; use the manual installation below or add your own Vercel-specific config (e.g. env vars or build-time config generation) before deploying. |
vercel.json
Outdated
| "index.php": { | ||
| "runtime": "vercel-php@0.8.0" | ||
| } |
There was a problem hiding this comment.
PR description references vercel-php@0.7.2, but vercel.json pins vercel-php@0.8.0. Please align the runtime version with the PR description (or update the description) so it’s clear which runtime version is intended and tested.
|
@copilot Vercel does not persist any files by default, so the configuration and database would need to be stored differently. If this is not easily implementable, we should abandon this PR for now. |
…ss filesystem limitations Co-authored-by: Alanaktion <236490+Alanaktion@users.noreply.github.com>
Agreed — Reverted all changes (vercel.json, .vercelignore, and the README button) in commit 067c66b. |
Reverts the one-click Vercel deploy button and associated configuration files, as a functional Vercel deployment is not feasible without significant additional work.
Vercel's serverless filesystem is ephemeral:
install.phpwritesconfig.phpto disk at runtime, which does not persist between requests. SQLite databases and user uploads would be lost as well. Supporting Vercel properly would require env-based config loading, an external database, and external file storage.Changes
vercel.json— Removed.vercelignore— RemovedREADME.md— Removed Vercel deploy badge🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.