Documentation

Deploy a PHP app

Deploy Laravel, Symfony or plain PHP apps on Rebasable with Composer and a production web server.

Rebasable detects PHP from composer.json or index.php. Dependencies are installed with Composer, and the app is served by a production web server with PHP-FPM listening on PORT.

Laravel

Setting Value
Build command composer install --no-dev --optimize-autoloader && npm ci && npm run build
Pre-deploy command php artisan migrate --force
Start command auto-detected (serves public/)

Environment variables:

APP_ENV=production
APP_KEY=base64:...          # php artisan key:generate --show
APP_URL=https://my-app.rebasable.com
LOG_CHANNEL=stderr
DB_CONNECTION=pgsql
DB_URL=...                  # internal URL of your Rebasable Postgres

Queue workers: create a background worker with start command php artisan queue:work. The scheduler: a cron job every minute running php artisan schedule:run.

Symfony

Set APP_ENV=prod, run composer install --no-dev and php bin/console cache:warmup in the build, and serve public/.

Custom setup

Need extensions or a specific server? Add a Dockerfile (see Docker), for example based on php:8.3-apache with Listen ${PORT}.