datasette-publish-fly icon indicating copy to clipboard operation
datasette-publish-fly copied to clipboard

Document usage with datasette-scale-to-zero

Open simonw opened this issue 10 months ago • 2 comments

Following #29 I decided to try this:

datasette publish fly \
   fixtures.db \
   --app datasette-publish-fly-issue-29 \
   --install datasette-auth-passwords \
   --plugin-secret datasette-auth-passwords root_password_hash 'pbkdf2_sha256$480000$9ce99372d1fa079f770d4e2245bcf335$zJjskTDc6M8sxmEUYZBr/EC0e730Q9pzcF8RJB43c/c=' \
   --install datasette-scale-to-zero \
   --plugin-secret datasette-scale-to-zero duration 5m

Using https://datasette.io/plugins/datasette-scale-to-zero ... and it worked!

I watched the Fly Dashboard and the app at https://datasette-publish-fly-issue-29.fly.dev/ now successfully scales to zero if it receives no hits for 5 minutes, then starts running again when traffic arrives:

Here's it exiting 5m after the last request:

CleanShot 2023-08-21 at 12 14 55@2x

And here's it rebooting when a new request comes in:

CleanShot 2023-08-21 at 12 16 59@2x

simonw avatar Aug 21 '23 19:08 simonw