Setup Craft on DigitalOcean With Dokku

Problem

You want to get up and running with a new Craft site in 5 minutes then dokku on DigitalOcean is your friend.

Solution

See dokku-craft or follow these instructions:

Follow this tutorial until the section “Deploying Code”. Then…

On dokku server:

$ cd /var/lib/dokku/plugins $ git clone https://github.com/Kloadut/dokku-md-plugin mariadb $ git clone https://github.com/musicglue/dokku-user-env-compile.git user-env-compile $ dokku plugins-install

On your pc:

$ git clone https://github.com/bilke/dokku-craft.git

Check for the current Craft version number. Download latest craft inside your repository directory:

$ wget http://download.buildwithcraft.com/craft/1.3/1.3.2496/Craft-1.3.2496.zip $ unzip Craft-1.3.2496.zip ... replace craft/config/db.php? [y]es, [n]o, [A]ll, [N]one, [r]ename: no $ rm Craft-1.3.2496.zip

Now add all files to git:

$ git add . $ git commit -m "Craft files."

Add the dokku remote and push to it:

$ git remote add dokku [email protected]_name.com:app_name $ git push dokku master

On dokku server:

$ dokku mariadb:create app_name

Hit app_name.apps.domain_name.com/admin in your browser and follow Craft’s instructions to finish the installation.