How I Built and Host This Blog

Yes, this blog is in WordPress, however it’s not on a simple shared host. I’m hosting this on Digital Ocean, in a Droplet. This droplet is a linux using an open source toolset known as Dokku, an open source alternative to Heroku. I can host all my websites inside of one Digital Ocean Droplet.

I ended up having to build this to use Digital Oceans Volume Storage so I could have better control of the file system and could make sure things remained intact.

Below is some of the commands that I had to use on the Dokku machine to make the site work.

dokku apps:create $APP_NAME
mkdir -p /mnt/volume_db_storage/$APP_NAME
ln -s /mnt/volume_db_storage/$APP_NAME /var/lib/dokku/data/storage/$APP_NAME
chown 32767:32767 /mnt/volume_db_storage/$APP_NAME
chown 32767:32767 /var/lib/dokku/data/storage/$APP_NAME
dokku storage:mount $APP_NAME /var/lib/dokku/data/storage/$APP_NAME:/app/wordpress
dokku mysql:create $APP_NAME-database
dokku mysql:link $APP_NAME-database $APP_NAME
dokku letsencrypt $APP_NAME
dokku domains:add $APP_NAME $DOMAIN_NAME

I also had to customize the wp-config.php file, in order for it to connect to the database and have the proper keys/salts.