Open jelhan opened 4 years ago
I started reviewing some of the available options.
Netlify's main use case is hosting static pages. Support for serverless functions (AWS lambda) has been added some time ago. But it currently only supports JavaScript and Go. So Netlify is not an option for Croodle hosting.
Heroku seems to be a better option. It has official support for deploying PHP applications. See free plan may even require enough "dyno hours" for our use case. It also supports custom domains. But there are two main trade-offs: 1. It doesn't seem to provide SSL in the free plan. 2. It doesn't provide an integration to host files. In order to use Heroku we would first need to add support for storing the poll files on a cloud service like AWS S3.
DigitalOcean provides a product called App Platform since a few months. It allows to deploy an application as a docker container in the basic plan, which starts at 5$/month. It includes support for custom domains and SSL certificates. As Heroku it does not provide an option to mount a volume into the container but requires usage of a cloud service like AWS S3 or Spaces from DigitalOcean, which is a S3-compatible object storage service.
Another option I have come across is Google Cloud Run but I haven't had the time to fully verify it yet.
While reviewing the different options I noticed that support for review applications that are deployed automatically for each pull request until it's either merged or closed would be very helpful. Heroku is the only service, which has explicit support for review apps.
It seems that adding support for storing the files on cloud rather than on local filesystem is a prerequisite for this one. If we decide to do so, we should consider using Flysystem. Flysystem provides an abstraction layer to interact with filesystems in PHP. It provides support for common cloud providers like AWS S3, Azure and DigitalOcean spaces, local filesystem and even in memory, which might be helpful for testing.
We should provide a canary deployment giving access to the latest development of Croodle. This could serve for demo purposes (#354) as well as for testing.
It should include a clear statement that the hosting is only meant to be used for demo/testing purposes. User should be warned to not use it with real data.
Need to investigate if the free plans of Netlify, Heroku or a similar service could be used for hosting. Deployment should be automated as part of CI pipeline.