Last active
August 29, 2015 13:57
-
-
Save markrickert/9766010 to your computer and use it in GitHub Desktop.
DigitalOcean Dokku Server Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a DigitalOcean Ubuntu 12.04.3x64 droplet. | |
# DO NOT USE 13.10. There's a known issue with Dokku | |
# https://github.com/progrium/dokku#requirements | |
# On the server, install dependencies and Dokku | |
apt-get update && apt-get upgrade -y | |
apt-get install -y software-properties-common python-software-properties | |
wget -qO- https://raw.github.com/progrium/dokku/v0.2.2/bootstrap.sh | sudo DOKKU_TAG=v0.2.2 bash | |
# Put the app's hostname into the Dokku VHOST file | |
echo mohawkapps.com > /home/dokku/VHOST | |
# Install Dokku Plugins | |
cd /var/lib/dokku/plugins | |
git clone https://github.com/luxifer/dokku-redis-plugin dokku-redis | |
git clone https://github.com/scottatron/dokku-rebuild dokku-rebuild | |
git clone https://github.com/pnegahdar/dokku-node.git dokku-node | |
dokku plugins-install | |
# If you're using a 512 instance, you have to do this or on reboot, it'll fail with: | |
# fatal error: runtime: cannot allocate heap metadata | |
# | |
# https://github.com/dotcloud/docker/issues/1555#issuecomment-22874190 | |
dd if=/dev/zero of=/extraswap bs=1M count=512 | |
mkswap /extraswap | |
# Add this line to your /etc/fstab file: | |
/extraswap none swap sw 0 0 | |
# Then run | |
swapon -a | |
# Locally, push your public key to the server | |
cat ~/.ssh/id_rsa.pub | ssh [email protected] "sudo sshcommand acl-add dokku $USER" | |
# Create the redis instance for the application | |
dokku redis:create winds-aloft | |
# Use git to push to [email protected]:winds-aloft | |
# | |
# Something like: | |
git remote add remote-name [email protected]:winds-aloft | |
git push remote-name master | |
# Here’s how to get to the console from the server: | |
dokku run winds-aloft rails console |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment