-
-
Save colindensem/eef1dd1be280f77cac1bd1e7af972a7f to your computer and use it in GitHub Desktop.
Install and use nanobox on a linux cloud box (or about any other linux box). Tested on DigitalOcean 16.04
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
# become root (if not already) | |
sudo su | |
# create user 'nanouser' with password 'password' | |
useradd -m -p papAq5PwY/QQM -s /bin/bash nanouser | |
# make 'nanouser' a sudoer | |
usermod -aG sudo nanouser | |
# get docker | |
curl -fsSL https://get.docker.com/ | sh | |
# add 'nanouser' to docker group | |
usermod -aG docker nanouser | |
# create some directories | |
mkdir -p /home/nanouser/Downloads/nano | |
mkdir /home/nanouser/bin | |
# download and extract the installer (technically it should be downloaded after logging into the dashboard, but it is open source). Re-run to upgrade | |
curl https://d1ormdui8qdvue.cloudfront.net/installers/v2/linux/nanobox-2.tar.gz | tar -C /home/nanouser/Downloads/nano -zxf - | |
# link required binaries to `bin` path | |
ln -sf /home/nanouser/Downloads/nano/usr/local/bin/nanobox /home/nanouser/bin/nanobox | |
ln -sf /home/nanouser/Downloads/nano/usr/local/bin/nanobox-machine /home/nanouser/bin/nanobox-machine | |
ln -sf /home/nanouser/Downloads/nano/usr/local/bin/nanobox-vpn /home/nanouser/bin/nanobox-vpn | |
# add `bin` to path | |
echo 'export PATH=$PATH:/home/nanouser/bin' >> /home/nanouser/.bashrc | |
# enable swap for larger codebases | |
fallocate -l 2G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
# login as nanouser | |
su - nanouser | |
# clone your application (best to login via `ssh -A`) | |
git clone https://github.com/nanobox-quickstarts/nanobox-rails.git && cd nanobox-rails | |
# run the nanobox! | |
nanobox run | |
# will have prompts for install and request login to nanobox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment