Run Database in GitHub Actions, Persisting Data to S3, and Access It Publicly
wesql.io
wesql.io
The article says this about VPSs:
You often end up paying for
resources even when you're
not using them.
But how is that different with S3? They also do not store the data for free.And you can delete a VPS via API just like you can delete an S3 container.
VPS has two main drawbacks:
Many don't guarantee persistent disk storage It's not ideal for CI/CD scenarios where you need ephemeral databases for testing But you're right - if you need a simple, always-on database, a $5 VPS might be a good choice.
Just to point out, if the data is important you'll want backups anyway. Even with S3.
Just in case. :D
Much more likely, though, is that you, or some sysadmin at your company, or even some user will accidentally hit the "delete" button on something important, and then without a backup, you can't get it back. Which is honestly the thing that people usually need their backups for, anyway. This is what most "data loss incidents" are: people just messing up and deleting things they shouldn't have. Wetware is much more prone to failure than hardware, after all.
In case something goes wrong. ie your account has a problem unexpectedly, or if they do indeed have a data loss/corruption problem, etc.
I mean kinda? It's free for public repositories, but free doesn't mean free for anything. The use of GitHub actions, like most thing in life, has terms of service[1]. This use-case arguably breaks the term "for example, don't use Actions [...] as part of a serverless application". If you start using this for demos, you'd probably also be breaking "You may only access and use GitHub Actions to develop and test your application(s)".
It's up to GitHub if they choose to enforce any of these terms. I just want to point out that there are limits to "free".
[1]: https://docs.github.com/en/site-policy/github-terms/github-t...
> for example, don't use Actions as a content delivery network or as part of a serverless application, but a low benefit Action could be ok if it’s also low burden
Just as the wesql article states, Use Cases is Not Recommended For:
- Long-term database hosting or production workloads. - Maintaining an always-on public database endpoint. - Circumventing GitHub Actions usage policies.
Then a person comes in starts gobbling every sample, because they believe "free tiers are meant to be abused".
That’s what happens in practice, even if they don’t believe this.
Also, social shame generally applies and people conform to social norms.
That branch is rebased down to $tip so it shares no commits, and the 'database' doesn't affect development in trunk.
Obviously this doesn't work for significant data analysis, but if it's just a question of 'what was the state at the last run' it's cheap and easy.
> Here's how to abuse GitHub Actions to run a database
> DISCLAIMER: DO NOT ABUSE GITHUB ACTIONS DO RUN A DATABASE!
Meanwhile, a cloud VPS is down to €3.60/mo.Provisioning a VPS takes ~30-60 seconds, and bootstrapping them with cloudinit is an option most places, so you could even spin them up and down as you need. But honestly, the effort isn't worth saving €3.60/mo. over.
These are the benefits brought by Wesql, a new database based on S3 that is compatible with MySQL.
You can shut down the compute service and restart it anywhere else - the data will simply restore from S3.
Edit: suggest looking at this other post https://wesql.io/blog/every-database-will-be-rearchitectured...
But that's the cool thing about WeSQL - you can run it anywhere! Just fire it up like any other container. For production, throw it on ECS/EKS and you're good to go.