Earlier this week I had a silly idea and wanted to throw up a static website w/ some very basic content (much like GitHub Pages provides). I of course wanted to host this myself, not on GitHub.
After a quick search I found this is actually very easy to do if you're using dokku (which if you've been following along w/ me on this indieweb journey you may already be!)
$ cd /var/lib/dokku/plugins $ git clone https://github.com/rhy-jot/buildpack-nginx $ dokku plugins-install
That's it! Now you can make a static site. Make a new repo with a
.nginx file (it can be empty, it just has to exist) and a
www folder. Everything in the
www folder will be served at the root of whatever domain you point it to with dokku
Make your site
$ touch .nginx $ mkdir www/ $ echo "<h1>Hi!</h1>" >> www/index.html $ git add remote dokku dokku@dokku-server:hostname $ git add . $ git commit -m "Hello World" $ git push dokku master
You can now to go hostname and see your html! It's that easy. To reiterate: anything you put in the www folder will be served at the configured site.
P.S. the idea that made me look into this was this one