Dwight Watson's blog

Deploying to multiple Laravel Vapor apps

This blog post was originally published a little while ago. Please consider that it may no longer be relevant or even accurate.

I recently launched HighSchoolNotes.com.au into another region HighSchoolNotes.co.nz. Under the hood this is the very same Laravel app, deployed onto Laravel Vapor. Initially I had the New Zealand app running as a separate environment in the main app (production and production-nz) but it felt like it was a better decision to split these entirely - while they run the same code they use different databases, caches and storage.

Luckily, Laravel Vapor has a mechanism for supporting multiple Laravel apps for the same project - and that is letting you point it to a configuration file when you call it. By default this will be vapor.yml but you can change this as well as having multiple. For my second app I added vapor.nz.yml which pointed to another setup - simply referencing that configuration file with --manifest is all you need work with multiple Vapor apps.

vapor deploy production --manifest=vapor.nz.yml

A blog about Laravel & Rails by Dwight Watson;

Picture of Dwight Watson

Follow me on Twitter, or GitHub.