I created giorgos/dokku-static-site which uses the ONBUILD instruction. To use it create a Dockerfile at the root directory of your static site with only one line:
and then place all your files under the
html directory. If moving your website
files to another directory isn't in your plans, you can alternatively create a
ln -s . html
Then push to your Deis / Dokku server as usual and it will download the image and do the rest.
git push dokku master
The image works nicely with Dokku's letencrypt plugin too, no need to worry about ports or custom Nginx configurations.
giorgos/dokku-static-site is based on debian:stable and a cron job will trigger a rebuild every hour to always be up-to-date with latest security patches.Go Top