Ask HN: Optimal cloud service to run tiny website with back end Python + SQLite?
73 points| djoldman | 5 years ago
Low price
Low maintenance time/cost
Simplicity
My strengths do not include web development/servers but I know the basics. I'm particularly interested in the gotchas like: difficulties setting up SSL, transfer limits, and "X is perfect except that ____".If I'm asking the wrong question or not providing enough info, please say so.
[+] [-] joshmn|5 years ago|reply
Installation is a breeze and there are plugins. If you're at all familiar with Heroku's deploy, you'll love this. It's the closest thing I've found to `git push` without any thinking.
[+] [-] throwaway77384|5 years ago|reply
I have noticed that deploys eat HDD for breakfast. Prune often. ("docker system df" helps show stats on space usage).
I have also read many optimisation guides talking about Alpine Linux images, but not sure whether that makes a difference.
Running a Go stack. Often wondering whether Caddy could be an alternative?
Sometimes I feel like this is still "too much". Like I still don't have enough control over the stack. Cloudflare introduces a lot of magic. I am not sure I fully grasp Dokku, but it works. Oh well!
[+] [-] tasuki|5 years ago|reply
[+] [-] StavrosK|5 years ago|reply
[+] [-] znpy|5 years ago|reply
[+] [-] rasulkireev|5 years ago|reply
Once you a succeed each subsequent time becomes much easier. Plus you get to learn a ton about server management.
There are fantastic posts that will help you.
https://www.digitalocean.com/community/tutorials/how-to-set-...
[+] [-] kumarvvr|5 years ago|reply
[+] [-] platform|5 years ago|reply
https://prgmr.com/xen/ inexpensive. no overage charges. can pay by bitcoin. (and a FreeBSD friendly).
I wonder if you would also benefit from installing something like yunohost [2] on top of Debian. This will get you your personal cloud. And the use YounoHost's 'Custom web app' container [4]
This way, you get an automatically configured web server (nginx), with certificates (via Let's encrypt) that get auto updated.
You also get a pre-configured user/sftp access to your app's folders.
And those folders will be backed up when you hit the backup button...
Nginx will invoke your python app when the predefined URL is hit.
All you have to do is to point your domain registrar to the prmgr VPS host running yunohost.
[2] https://yunohost.org/#/whatsyunohost [3] https://yunohost.org/#/apps [4] https://github.com/YunoHost-Apps/my_webapp_ynh
[+] [-] dclusin|5 years ago|reply
[+] [-] doctoboggan|5 years ago|reply
[+] [-] justsomeuser|5 years ago|reply
[+] [-] stubob|5 years ago|reply
[+] [-] paxpelus|5 years ago|reply
[+] [-] sebastien_bois|5 years ago|reply
[+] [-] znpy|5 years ago|reply
[+] [-] tln|5 years ago|reply
I second heroku for OPs requirements, extremely easy to set up and manage, and the free tier handles many small sites well.
Whatever you choose, use cloudflare for free SSL.
[+] [-] luto|5 years ago|reply
disclaimer: I work for them, but used to be a customer long before I started.
[+] [-] kirubakaran|5 years ago|reply
[+] [-] anaganisk|5 years ago|reply
[+] [-] antender|5 years ago|reply
[+] [-] rich_sasha|5 years ago|reply
In particular, all the web hosting side of things is preconfigured.
[+] [-] syedmeesamali|5 years ago|reply
[+] [-] bitfhacker|5 years ago|reply
[+] [-] blikdak|5 years ago|reply
[+] [-] anaganisk|5 years ago|reply
[+] [-] aoeusnth1|5 years ago|reply
Personally from there I would use a min-spec Postgres CloudSQL for the DB, but you can use whatever hosting you like if you want to DIY.
[+] [-] MoBattah_|5 years ago|reply
If you want to keep it simple..
A very small EC2 box. Maybe even micro instance. That'll run your python code + sqlite.
If you want, you can use an elastic load balancer or Route53. If you don't have DNS already. Route53 is AWS's DNS service which is easy to use.
This whole setup should not cost you much. If you do it right, you can probably spend less than $10/month taking advantage of the free tier.
Later on, as a side project, you can try to make the app serverless. You're probably close to it being serverless. Doing this allows you to run it on AWS Lambda. Which makes things even cheaper, if not free. And it's just pretty cool.
But most likely you'd have to switch to a real data store. No problem since AWS has DynamoDB.
[+] [-] rini17|5 years ago|reply
[+] [-] aivarsk|5 years ago|reply
But Atlantic had a 256Mb RAM, 10Gb disk option years ago for just $0.99 I still have one server there for hosting static HTML, running some scraping tasks, MS document to PDF conversion service (Python Twisted) for a customer, etc. All that for just $1.20 a month (including VAT)
[+] [-] anildash|5 years ago|reply
[+] [-] mateioprea|5 years ago|reply
[+] [-] bunya017|5 years ago|reply
Scaleway + Cloudflare + CapRover, you get the simplicity and joy of using PAAS without the cost. CapRover's one click install is awesome.
[+] [-] somishere|5 years ago|reply
If I were in your shoes I'd be looking at either:
- Firebase (free tier). Probably just using their RTDB for storage. You could conceivably do away with your backend entirely here.
- Cloudflare workers + KV storage (~$5 per month?) .. this would give you killer performance and let you write your storage logic in python. You're paying a minimum fee per month here, but in reality that could cover a large number of seperate sites.
Both suggestions raise vendor lock-in considerations, but given the use-case it doesn't seem like a major concern. Of course if you're looking forward to the joys of managing a box ...
[+] [-] chrisgoman|5 years ago|reply
You can also get a free tier at Amazon AWS but you have to learn all the EC2 stuff and almost piece yourself a server one piece at a time (like the good old days where you build your own PC but clicking buttons) -- IMHO this takes much longer than just doing a $5 VPS and typing things. So if you want to learn Amazon AWS stuff, this may be a good path but it is going to take a lot longer
[+] [-] gospaz|5 years ago|reply
Python + SQLite AWS EC2 t2.micro
DNS + SSL Cloudflare free plan
Total cost = $0
[+] [-] martininmelb|5 years ago|reply
I also use Cloudflare as a DNS (free tier).
https://martin.schweitzer.id.au/covid19/
[+] [-] mahalol|5 years ago|reply