Skip to content

Instantly share code, notes, and snippets.

@silverbux
Last active November 27, 2015 01:53
Show Gist options
  • Select an option

  • Save silverbux/f0b9af959f1ed98cc4b4 to your computer and use it in GitHub Desktop.

Select an option

Save silverbux/f0b9af959f1ed98cc4b4 to your computer and use it in GitHub Desktop.

Revisions

  1. silverbux revised this gist Nov 25, 2015. 1 changed file with 17 additions and 15 deletions.
    32 changes: 17 additions & 15 deletions dokku-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,19 @@
    #!/bin/bash

    dokku plugin:install https://github.com/dokku/dokku-mongo.git mongo
    apt-get install -y mongodb-clients
    docker pull mongo:2.6.11
    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'
    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!'
  2. silverbux revised this gist Nov 25, 2015. No changes.
  3. silverbux created this gist Nov 25, 2015.
    17 changes: 17 additions & 0 deletions dokku-setup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    #!/bin/bash

    dokku plugin:install https://github.com/dokku/dokku-mongo.git mongo
    apt-get install -y mongodb-clients
    docker pull mongo:2.6.11
    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'