
How to Setup Your Own PaaS with Dokku and Node and React and Mongodb and Nginx - albertgao
http://www.albertgao.xyz/2019/01/28/how-to-setup-your-own-paas-with-dokku-node-react-mongodb-nginx/
======
mimischi
Dokku is great! If you're not concerned running your apps/database one the
same node, you're good. There are tons of plugins for different databases
(MariaDB, PostgreSQL, MongoDB, ...), as well as other services like Let's
Encrypt. DigitalOcean also offers to install it when creating a Droplet, so
it's easy to get started. Manual installation is also straightforward. I've
been using it for several years on former-HPC nodes in our University
computing center to host small apps made by students.

To add to the example in the blog post, I've played around with containerizing
Django with Docker and deploying it to Dokku (Heroku should also be possible I
guess): [https://github.com/mimischi/django-
docker](https://github.com/mimischi/django-docker)

It's also possible to spin-up your own Sentry instance (open source error
tracking) with Dokku ([https://github.com/mimischi/dokku-
sentry](https://github.com/mimischi/dokku-sentry)), as well as Minio, a simple
S3 clone: [https://github.com/slypix/minio-
dokku/issues](https://github.com/slypix/minio-dokku/issues)

------
ovi256
Dokku seems like a good tool with good developper experience, equivalent to
Heroku. It would allow you to quickly experiment. Want to setup a new web app
/ service ? Heroku-like simplicity, just some clicks and a git push.

Anyone who has tried dokku's postgres database solution ? Where to store state
is IMO the big missing piece from these Paas tools. They solve the stateless
compute part nicely (with Flynn you can even setup something Dokku-like on
multiple servers with automatic failover) but there's nothing offering
automatic failover for a database that doesn't require you to be a db admin.

~~~
crote
I've been running it for a couple of years now, and it basically just works.
Don't expect too much out of it, though: it's basically just a small but very
convenient wrapper around Docker.

If you need replication, failover, automatic backups, scaling, or something of
that order, Dokku is probably not what you're looking for. If you just have an
app with a handful of users, it's absolutely amazing.

I looked into Flynn as well, but it seemed way too complicated for my use
case: it's a bit overkill to spin up three machines when there's probably only
one user at a time and it's idle all but 5 minutes a day.

~~~
WrtCdEvrydy
Flynn can be run in single computer mode or any multiple of N+1. The issue
with running single computer mode on Flynn is that if the Flynn core modules
become unstable (most likely due to lack of RAM), you'll probably need to wait
for self healing. In multi computer mode, you can basically kill 2 of the
computers and still be functional.

Their standard mode prioritizes your apps over their management layer so if
you happen to deploy an app that eats up all the RAM, expect to hard reboot
that host in order to get the management layer back.

------
block_dagger
I’ve used Dokku in production for several months. For single-server app
deploys, it works amazingly well.

------
sonaltr
I recently found out that I could get a 2 GB / 2 Core machine for ~ $15/yr -
and my plan is to buy a bunch of them (~ 150 - 200) to make my own cluster for
my personal needs, learning and running some stuff I charge $ for.

One thing they didn't mention was specifically MongoDB management - Backing
up, restore etc.

Personally I was planning on using Nomad (or K8S if I could get into the GCP
K8S Engine Hybrid Cloud Preview) to manage my clusters.

~~~
victor106
That seems like a great deal. Where did you find it?

~~~
sonaltr
I used lowendbox[0] to find great deals.

Then, I automated buying a ton of them into one bill as they generally don't
allow you to bulk buy (which lead to a failed bill as it broke their billing.
This lead their sales team to contact me to discuss my usage. Then they
provided me with a better quote than the one on Lowendbox).

I wrote $15 / yr as that's the "discounted" price on Lowendbox. But if you
bulk buy or buy with a commitment for 3 yrs - it's even cheaper (or you can
negotiate to get more stuff for the same price). I can't talk about how much I
end up paying as we've a special deal based on our usage.

[0] [https://lowendbox.com](https://lowendbox.com)

~~~
imPndy
For what it's worth, last time I checked pretty much every host on lowendbox
is a customer from ColoCrossing (the owner of the site, data center owner) and
there's recently been some shady stuff happening over at LowEndTalk (basically
forum side) of spammers and other hosts being unbanned by CC (as they own both
sites, and operate LEB, LET is mostly operated by volunteers) , and just
recently one host offering 3 year amazing deals, similar/better than what you
got, operating for little over a year and little bit after BlackFriday where
they again we're selling their 3 year deals just completely closed shop,
almost without any communication, and CC deleted any mention of them from LEB.

Not exactly saying your host will do the same, but there's a reason almost all
the hosts offer same locations (NY, LA and Chicago), and those specs with that
price (even without discount) is unbelievable cheap, maybe too cheap

~~~
sonaltr
Thanks for the heads up!

I had noticed that almost all of them had the exact same website, emails and
billing software. I assumed that it was like how all sites using Wordpress are
essentially the same if you take away the flashy JS stuff.

I am currently paying for a year and if all goes well, maybe update to a 3 yr
contract. My plan is to architect the cloud in a way that I can immediately
migrate / scale to GCP at the first sign of trouble - so my data / customers
etc. should ideally not have issues. But from a cost standup, it's definitely
going to be difficult.

------
52-6F-62
We use Dokku for a set of services (within a specific scope) at work.

I was highly sceptical of it at first, as I had preferred managing deployments
on a lower level—and for some good reasons(similar criticisms with Heroku
itself). That said, I have adapted and it's been good. Once we had some
customizations in place it worked out great. And the plugins are generally
well-done. Very little is too obscured.

------
brylie
I would like to use Dokku and not have to worry about the underlying software
maintenance. Are there any companies offering Dokku as PaaS?

~~~
zrail
...Heroku?

~~~
CrazyPyroLinux
digitalocean.com also has a "marketplace" of many preconfigured droplets
(VPS), including "Dokku 0.12.13 on 18.04)

------
onlywicked
Dokku is good but I prefer CaptainRover (previously CaptainDuckDuck).

It solves lots of problem I had with dokku in the past.

~~~
josegonzalez
What problems were those? We (currently, though this will change _very_ soon)
do not have HA support, but otherwise I'd hope that any issues you've had are
things we've resolved, or that there are open tickets for them.

Note: I'm the maintainer of Dokku. Feel free to reach out privately with any
thoughts as well :)

~~~
onlywicked
If I restart the server, domain mapping doesn't work properly. I have to stop
every container and then restart them again to point to correct domains.

I hope it has been fixed.

------
9dev
I looked at the Dokku website and despite even looking at the docs, I still
have no clue what it actually _does_. I see that a lot with SaaS software or
fancy OSS projects. Maybe it's just my German attitude, but I don't want to
know how astounding and wonderful your product is, but what it does and how it
works!

~~~
tga
You don't need to look farther than the homepage to get an idea of what Dokku
does:

 __Once it 's set up on a host, you can push Heroku-compatible applications to
it via Git. They'll build using Heroku buildpacks and then run in isolated
containers. __

------
kekzzz
Am I the only one around here who doesn't even know what the heck "PaaS" is?
All this WTFaaS is out of control...

~~~
bencord0
"SP 800-145. The NIST Definition of Cloud Computing"
[https://dl.acm.org/citation.cfm?id=2206223](https://dl.acm.org/citation.cfm?id=2206223)

The terms IaaS, PaaS and SaaS are defined under the "Service Models" section.

