Skip to content

Revert Vercel Deploy Button and deployment config#432

Closed
Copilot wants to merge 4 commits intomasterfrom
copilot/add-vercel-deploy-button
Closed

Revert Vercel Deploy Button and deployment config#432
Copilot wants to merge 4 commits intomasterfrom
copilot/add-vercel-deploy-button

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 5, 2026

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.php writes config.php to 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 — Removed
  • README.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.

Co-authored-by: Alanaktion <236490+Alanaktion@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Vercel Deploy Button to README for easy deployment Add Vercel Deploy Button and deployment config Mar 5, 2026
@Alanaktion Alanaktion marked this pull request as ready for review March 5, 2026 22:35
Copilot AI review requested due to automatic review settings March 5, 2026 22:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial support for one-click Vercel deployments by introducing Vercel configuration and a README deploy button.

Changes:

  • Add vercel.json to route requests through a PHP runtime.
  • Add a Vercel deploy button to README.md.
  • Add .vercelignore to 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"
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"dest": "/index.php"
"dest": "/index.php",
"check": true

Copilot uses AI. Check for mistakes.
README.md Outdated
[![CI](https://github.com/Alanaktion/phproject/workflows/CI/badge.svg)](https://github.com/Alanaktion/phproject/actions?query=workflow%3ACI)
[![Crowdin](https://badges.crowdin.net/phproject/localized.svg)](https://crowdin.com/project/phproject)

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FAlanaktion%2Fphproject)
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
[![Deploy with Vercel](https://vercel.com/button)](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.

Copilot uses AI. Check for mistakes.
vercel.json Outdated
Comment on lines +3 to +5
"index.php": {
"runtime": "vercel-php@0.8.0"
}
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 uses AI. Check for mistakes.
@Alanaktion
Copy link
Copy Markdown
Owner

@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>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 5, 2026

@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.

Agreed — config.php is written by the installer at runtime and won't survive on Vercel's ephemeral filesystem, and the same applies to SQLite databases and file uploads. There's no straightforward path to making this work without significant Vercel-specific plumbing (env-based config, external DB, etc.).

Reverted all changes (vercel.json, .vercelignore, and the README button) in commit 067c66b.

Copilot AI changed the title Add Vercel Deploy Button and deployment config Revert Vercel Deploy Button and deployment config Mar 5, 2026
@Alanaktion Alanaktion closed this Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants