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
- Via Dashboard
- Via GitHub
- Via VSCode
- Execute
composer installlocally - Exclude the
vendorfolder from the project - Compress into a ZIP file
- Access Dashboard → New Project → Application
- Select PHP language and upload
- Configure memory (256MB for simple APIs, 512MB for larger applications)
- Click “Create Application”
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