Run Dokku on External Volume
In order to leverage cloud-provider facilities like attachable volumes, (a.k.a. block storage) the following is an easy tutorial to achieve Dokku runs on them.
If the block storage is not available and attached on boot it is possible that containers will not correctly start. Please keep this in mind when considering moving Dokku and/or Docker to network attached storage.
The following is intended to be executed on the dokku host machine as
Say, for instance, that our volume is mapped into the systems as
Stop docker daemon
Prepare the filesystem:
Move the old data directories:
Move the data on the volume
Prepare the mountpoints
Start docker daemon
At this point all should be working fine, please check it out.
Then, let the changes be reboot-persistent
echo '/dev/vdb1 /mnt/volume ext4 defaults 0 2' | sudo tee -a /etc/fstab
echo '/mnt/volume/home/dokku /home/dokku none defaults,bind 0 0' | sudo tee -a /etc/fstab
echo '/mnt/volume/var/lib/dokku /var/lib/dokku none defaults,bind 0 0' | sudo tee -a /etc/fstab
echo '/mnt/volume/var/lib/docker /var/lib/docker none defaults,bind 0 0' | sudo tee -a /etc/fstab