brefphp / bref

Serverless PHP on AWS Lambda
https://bref.sh
MIT License
3.11k stars 367 forks source link

Deploy to Digitalocean functions #1494

Closed Lennix closed 1 year ago

Lennix commented 1 year ago

Digitalocean has its own PaaS offering called functions. They have a native php 8 runtime making it a great fit for bref.

A function is invoked by running its main method. The method stub is function main(array $args) : array

So no request->response, just very basic arrays.

Here's the documentation: https://docs.digitalocean.com/products/functions/

  1. Is it in the interest of this project to support PaaS providers other than AWS?
  2. How difficult is it to add additional providers to the project?
mnapoli commented 1 year ago

Short version: https://twitter.com/matthieunapoli/status/1641386293748695043

Adding support for more providers like Digital Ocean would definitely be great. However, it isn't something achievable without (financial) support from Digital Ocean. The reason for that is that it would be quite a bit of work to implement and then maintain.

aknosis commented 1 year ago

I'm curious, what would you want from bref that isn't provided by DO functions? AWS doesn't have native support for PHP so bref fills that gap.

mnapoli commented 1 year ago

@aknosis on top of the actual PHP runtimes for Lambda, Bref aims to provide a complete developer experience. Here's what Bref provides on top of just the runtimes:

I'm sure I'm forgetting a few details, but that should help get the idea.

Lennix commented 1 year ago

framework integrations (Laravel, Symfony) for one-step deployments

Thats a main point for me. I have a monolith written in symfony and I would like to outsource parts of it. DO Functions looked like a good fit, but without being able to easily use my existing stack, its not interesting.

@mnapoli Thanks for the quick response. I understand your reasoning. Maybe DO frees up some budget if they want to push functions adoption.

nicodemuz commented 1 year ago

I also run Symfony on DO. Support for DigitalOcean functions on Bref would be awesome.