Last active
November 27, 2015 01:53
-
-
Save silverbux/f0b9af959f1ed98cc4b4 to your computer and use it in GitHub Desktop.
Setup dokku on digitalocean + install mongodb plugin + fix mongodb remote connection issues + fix digital ocean memory issues
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
#!/bin/bash | |
dokku plugin:install https://github.com/dokku/dokku-mongo.git mongo && | |
docker pull mongo:2.6.11 && | |
apt-get install -y mongodb-clients && | |
echo 'export MONGO_CONFIG_OPTIONS=" --auth "' >> ~/.bashrc && | |
echo 'export MONGO_IMAGE_VERSION="2.6.11"' >> ~/.bashrc && | |
sudo swapon -s && | |
sudo fallocate -l 4G /swapfile && | |
ls -lh /swapfile && | |
sudo chmod 600 /swapfile && | |
ls -lh /swapfile && | |
sudo mkswap /swapfile && | |
sudo swapon /swapfile && | |
sudo swapon -s && | |
echo '/swapfile none swap sw 0 0' >> /etc/fstab && | |
echo 'IMPORTANT: execute "source ~/.bashrc" to apply environment variables' && | |
wait | |
echo 'yey!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
setup dokku plugins (mongodb) fix memory issues on digital ocean and fix mongodb versions