Hey gang, I am hosting a gitea instance (basically open source github), which can be connected to via HTTPS or SSH. Given that this is my private version control, I don’t need it running 24/7 and would like to have it scale down when it is idle. Here’s the pertinent part of my fly.toml:
The HTTP portion of this works for another app I have, but unfortunately this does not appear to actually scale the app down, and I’m guessing it has something to do with the services section I added to get SSH to work. Any idea where I might have gone wrong?
A fly config validate --strict is generally a good idea whenever you see puzzling behavior on the Fly.io platform, particularly when it involves auto-scaling.
Also, I’d check the metrics in Grafana to make sure there aren’t spurious connections that you were unaware of. Your port 22 means that you probably have a dedicated IP address, and that could be a magnet for bot traffic, …
Hope this helps a little!
Aside: You can manually scale down with fly m stop. I do this with a similar Machine that I have—i.e., one that’s only for personal tinkering. It’s less convenient, but it’s easy to encapsulate it into a small local Bash script.