DEV Community

Sam Newby
Sam Newby

Posted on

1

Disabling services in Laravel Vapor

I’m a huge fan of serverless and Laravel and then Taylor Otwell came along with Laravel Vapor. Allowing us to deploy our Laravel apps to serverless infrastructure on AWS.

We deploy a production and staging environment for each project. Really we don’t want to use Queues, Command Scheduler or Mail in our staging environment. We only want to use these features for our production environment. Vapor makes it really simple for us to do this by adding some configuration options to our Vapor config file: vapor.yml.

id: 19
name: serverless-rules
environments:
    staging:
        queues: false
        mail: false
        scheduler: false
Enter fullscreen mode Exit fullscreen mode

That’s all we need to is set these three config options to false in our staging environment and then it will remove Laravel’s Queue, scheduler and Mail sending functionality from AWS.

That’s all for this post, I use Vapor to deploy all my projects nowadays. If you would like to find out more about it then you can find it here: Vapor. Enjoy.

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more