Skip to main content

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

  1. Execute composer install locally
  2. Exclude the vendor folder from the project
  3. Compress into a ZIP file
  4. Access Dashboard → New Project → Application
  5. Select PHP language and upload
  6. Configure memory (256MB for simple APIs, 512MB for larger applications)
  7. Click “Create Application”

Available Versions

Notes

  • Dependencies: Use Composer to manage dependencies
  • Environment variables: Access via $_SERVER['...'] or use libraries like vlucas/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.0 on port $PORT