n nesly

Deploy Laravel / PHP

How nesly detects, builds and serves a Laravel / PHP project — and the two commands that put it on a live URL.

Deploy Laravel / PHP on nesly

A Laravel / PHP project is built into a container and run as a server process.

cd your-project
nesly addon add mysql
nesly addon add bucket
nesly deploy --yes

The first deploy creates the project and prints the live URL; after that, nesly deploy is enough.

How detection sees it

  • A Laravel tree (artisan + composer.json) runs as a container via the PHP runtime.
  • With the mysql addon, DB_* is derived from DATABASE_URL — a fresh skeleton stops talking to sqlite.
  • With the bucket addon, FILESYSTEM_DISK is set to s3 (AWS_* already injected) so uploads are not lost on a new pod.

When detection is not what you want, say it yourself: build and start commands, root directory and output directory live in nesly.toml committed next to the code — see builds.

Worth knowing

  • Set APP_KEY (php artisan key:generate) before the first request — diagnose names this when it is missing.
  • Schema changes belong in nesly.toml: release = "php artisan migrate --force".
  • Install league/flysystem-aws-s3-v3 when using the bucket disk.
  • Attach a managed database with nesly addon add postgres (or mssql) — connection env vars are injected on the next deploy.
  • When a deploy fails, nesly diagnose reads the logs for you and names the fix.

Full walkthrough: get started. Custom domains, backups, GitHub deploys and the rest of the reference: nesly CLI.