6 ms·
Run Database in GitHub Actions, Persisting Data to S3, and Access It Publicly
- fire_lake 2y agoOr just use Docker Compose?
- earayu 2y agoSure. That's the fascinating aspect of WeSQL database - its compute-storage separation allows you to run the database anywhere while data persists in S3. You can shut down the compute service and restart it anywhere else - the data will simply restore from S3.
- fire_lake 2y agoThis sounds really interesting, but the article motivation is test databases. Edit: suggest looking at this other post https://wesql.io/blog/every-database-will-be-rearchitectured-to-use-s3 https://wesql.io/blog/every-database-will-be-rearchitectured...
- earayu 2y agoYep, GitHub Actions isn't meant for production deployment - it's a CI/CD service with a 6-hour limit per run. 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.
- deleted 2y ago[deleted]
- ah27182 2y agoYea, I’m not following why this approach is radically different from just doing that
- mg 2y agoIs that really cheaper than to just use a VPS for $5/month which offers compute and storage and everything? 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.
- earayu 2y agoGitHub Actions is completely free, and you can always use free S3-compatible storage like Cloudflare R2, making the entire setup cost nothing. 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.
- GrygrFlzr 2y agoWait, this is news to me - which VPS providers do not have persistent data storage? Are you thinking of Heroku-like deployments? I feel like every VPS provider I've encountered always listed storage as a feature?
- earayu 2y agoI was thinking about EC2's default instance storage - it's ephemeral and gets wiped when you restart or stop the instance. Without paying for EBS volumes, EC2's storage is non-persistent by design.
- hhh 2y agoThe d variant machines you mean?
- thrw42A8N 2y agoYou can't rely on VPS disk - backups, data retention and recovery is all up to you in case of node failure. There are other much more expensive and much slower products (external networked volumes) that do offer guarantees, but that's additional charge.
- testemailfordg2 2y agoYou can persist data on Wasabi which is similar to S3 and pay even less...
- that_guy_iain 2y agoI get why these posts are popular but I always hate them. It's this sort of activity that results in free tiers being limited and removed.
- earayu 2y agojust use it for CI/CD
- chii 2y agoFree tiers are meant to be abused, because they should not be provided for free, and this is the market reacting to remove it.
- akshayKMR 2y agoImagine a restaurant offering free samples or complimentary dishes to their customers. It helps in product discovery, and indirectly in adoption of other products that they pay for. Then a person comes in starts gobbling every sample, because they believe "free tiers are meant to be abused".
- hk__2 2y ago> 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.
- sshine 2y ago> 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.
- earayu 2y agoUsing it for CI/CD purposes does not violate GitHub's Terms of Service.
- vivzkestrel 2y agonext stop: run database inside notepad powered by blockchain
- san1t1 2y agoI use an approach with Github Actions where if I need small amounts of persistent data between runs, I use a filesystem based off a fresh branch in the same repository. 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.
- snthpy 2y agoThanks, that's a cool idea.
- deleted 2y ago[deleted]
- lijingcheng87 2y agoThe benefits include not having to pay for the cost of owning the machine and disk, the computing nodes are only spun up when needed, and when your task is completed, the computing resources are not billed, and your data is stored on the cheaper S3. These are the benefits brought by Wesql, a new database based on S3 that is compatible with MySQL.