Jed Cunningham - Thousand Oaks Perl Mongers
February 21, 2017
software containerization platform
The smallest PaaS implementation you've ever seen
$ wget https://raw.githubusercontent.com/dokku/dokku/v0.8.0/bootstrap.sh
$ sudo DOKKU_TAG=v0.8.0 bash bootstrap.sh
FROM perl:5.24
COPY cpanfile /app/cpanfile
COPY script/mojopaste /app/mojopaste
RUN cpanm --installdeps /app
ENV PASTE_DIR /app/pastes
CMD ["/app/mojopaste", "daemon", "-l", "http://*:5000"]
$ dokku apps:create paste
$ git remote add dokku dokku@<dokku-hostname>:paste
$ git push dokku master
# ...
# =====> Application deployed:
# http://paste.<dokku-hostname>
$ vim script/mojopaste
# change title
$ git add script/mojopaste && git commit -m 'tite'
$ git push dokku master
$ mkdir -p /var/lib/dokku/data/storage/paste
$ chown -R 32767:32767 /var/lib/dokku/data/storage/paste/
$ dokku storage:mount paste /var/lib/dokku/data/storage/paste:/app/pastes
$ dokku ps:restart paste