Testing Hosting Pocketbase across cloud providers in a "serverless" way.
Both ways require a pocketbase container. see ./Dockerfile
Pocketbase initialised as an "extended" instance (Not using a straight up built binary) but rather builds the executable based on the pocket ./server project.
- AWS - Fargate
- Google - CloudRun
Initial investigation, Cloudrun is MUCH cheaper than Fargate, and additionally scales to 0 (No running instances). Fargate doesn't easily support scale to 0 functionality.
Scale to 0, means cloud run only charges when processing requests. Further to this 'cold starts' aren't bad at all.
It appears minimum spend on Fargate is about $7/8 a month with 0.25vCPU and 1 GB memory. Cloud run can be Zero
Update placeholder values in sst config sst.config.ts
providers: {
aws: {
profile: "<enter_profile>",
region: "eu-west-2",
},
gcp: {
project: "<Enter gcp project id>",
},
docker: "4.5.8",
},
Uses stage name to determine which cloud provider to use. Currently supports aws and google cloud.
sst deploy --stage <gcp | aws>Will throw an error if one of the supported providers aren't used for the stage.