Requirements
- PHP 8.2+ installed locally
- Composer for dependency management
- Account on Vertra Cloud
Project Structure
Configuration
composer.json
The platform automatically runs
composer install. Do not include the vendor folder in the upload.vertracloud.config
Example: Simple REST API
public/index.php
Deploy
- Dashboard
- CLI
- VS Code
- Compress the project into a
.zip(folders likenode_modules,venvandtargetare removed automatically) or push it to GitHub. - In the dashboard, click New Project and upload the
.zipor paste the repository URL. - In Build, check the runtime (PHP), the main file (
public/index.php) and the memory. Start and build commands are under Advanced settings. - Add your environment variables in Environment.
- In Network, turn on web publishing so the app gets a
*.vertraweb.appaddress (512 MB of memory or more). The app must listen on port 80. - Review and deploy. Follow the output in the Logs tab.
Available Versions
Notes
- Dependencies: Use Composer to manage dependencies
- Environment variables: Access via
$_SERVER['...']or use libraries likevlucas/phpdotenv - Logs: Print to stdout/stderr to appear in dashboard logs
- Sessions: Configure in-memory sessions or with Redis if needed
- Security: Use
header('Content-Type: application/json')for APIs - Listen on
0.0.0.0on port$PORT