Hacker News new | past | comments | ask | show | jobs | submit login

I use Dokku, which is like Heroku, but on my own server. To setup a backend, I just write the code with whatever I want (I use Elixir) and I use a local DB to test, using an env var to get the DB host. Then, I create an app on Dokku, a server, and deploy:

Dokku install:

    $> wget https://raw.githubusercontent.com/dokku/dokku/v0.19.13/bootstrap.sh;
    $> sudo DOKKU_TAG=v0.19.13 bash bootstrap.sh
Now, go to the server's IP or the domain you have setup previously and configure it with an SSH key and some other options.

Create an app:

On the server:

    $> dokku apps:create application_name
    $> dokku postgres:create application_db
    $> dokku postgres:link application_db application_name
Deploy the app:

On the client:

    $> git remote add dokku ssh://dokku.servername.tld:22/application_name
    $> git push dokku master
Once more on the server, to get TLS certs set up and auto-renewal (only the first time per application):

    $> dokku letsencrypt application_name
    $> dokku letsencrypt:cron-job --add
Then it just builds automagically, and as long as you use some sort of took to coordinate your database schema (for my use I use ecto migrations), then you don't need to do any more than this, really. You might have to do some limited configuration in your repo, but not much (add a .buildpacks file, then maybe a buildpack.config and a app.json).

For a static site, you literally push a repo with a `.static` file and an `index.html` in the root dir (you can do more complicated things, too).

It's not quite as powerful as k8s or whatever, but it can run small to medium sites easily, and it does have an Alpha-quality scheduler to push to k8s that I haven't tried yet, but should work as well as the Docker backend, eventually (and I'll switch to that when it's fully capable, too).

With DigitalOcean, I hear you can do 1-click Dokku servers if you don't want to do it yourself (I haven't tried this).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: