Framework guide

Deploy a Laravel app from GitHub

Deploy a Laravel app from source on Shiprr with Composer dependencies, production env vars, build commands, runtime logs, health checks, custom domains, and rollback.

Before you start

  • Your Laravel app should be in a GitHub or GitLab repository.
  • Commit composer.json and composer.lock.
  • Do not commit your production .env file.
  • Prepare production values such as APP_KEY, APP_ENV, APP_URL, and DATABASE_URL.

Shiprr can detect PHP projects from composer.json. For a Laravel HTTP app, use explicit settings under App → Settings → Build & Runtime.

root directory: ./
install command: composer install --no-dev --prefer-dist --no-interaction --optimize-autoloader
build command: php artisan config:cache && php artisan route:cache && php artisan view:cache
start command: php artisan serve --host=0.0.0.0 --port=$PORT
health check path: /

If your app serves a dedicated health route, use that path instead of /. For apps in a monorepo, set the root directory to the folder containing artisan.

Environment variables

Add production values under App → Settings → Environment variables. Saving env vars redeploys the app so new values apply to live replicas.

APP_NAME=Shiprr Laravel
APP_ENV=production
APP_KEY=base64:...
APP_DEBUG=false
APP_URL=https://example.com
DATABASE_URL=postgres://...
LOG_CHANNEL=stderr

Generate APP_KEY locally or in a trusted environment, then paste the value into Shiprr. Keep it out of Git.

Database and migrations

Laravel apps usually need a production database before the first deploy. Add the database URL or individual database env vars before deploying.

DB_CONNECTION=pgsql
DB_HOST=...
DB_PORT=5432
DB_DATABASE=...
DB_USERNAME=...
DB_PASSWORD=...

Run schema migrations deliberately. A rollback can return the app code to a previous build, but it does not roll back database contents or external services.

Health checks

The root path can work as a health check if it is fast and does not require login. For production apps, a dedicated route is often cleaner.

Route::get('/health', function () {
    return response('ok', 200);
});

If you add that route, set the health check path to /health.

Deploy

  1. Open the dashboard and choose Apps → New app.
  2. Connect GitHub or GitLab if needed.
  3. Select the repository, branch, region, root directory, and deploy trigger.
  4. Confirm install, build, start command, health check path, resources, and env vars.
  5. Create and deploy the app.

New apps start with 1,000 MHz CPU and 512 MB RAM per replica. Increase CPU, RAM, or replicas if the app needs more request capacity.

Verify and debug

  • Use build logs when Composer install, cache generation, or framework bootstrap fails.
  • Use runtime logs when the app starts and then crashes.
  • Check APP_KEY, database env vars, and APP_DEBUG=false before production traffic.

After the default Shiprr hostname works, attach a custom domain from the app's Domains page. Shiprr provisions HTTPS automatically after DNS points to the Shiprr target.

Rollback

If a release breaks the app, roll back from deployment/build history. Shiprr reuses the selected previous successful build, skips a source rebuild, and creates a fresh deployment attempt with current runtime settings.

Deploy your Laravel app on Shiprr

New accounts include welcome credit, enough to try a small app before paying.

Create account