Skip to content

Instantly share code, notes, and snippets.

@UlisesGascon
Last active December 23, 2020 09:02
Show Gist options
  • Save UlisesGascon/ac6df52e470f9ee9c8e840448574193a to your computer and use it in GitHub Desktop.
Save UlisesGascon/ac6df52e470f9ee9c8e840448574193a to your computer and use it in GitHub Desktop.
Digital Ocean with Docker Compose a Nodejs
#!/bin/sh
echo "START: Installing dependencies for Node, Docker and Docker Compose in DO"
cd /home
mkdir WORKSPACE
cd WORKSPACE
# Nodejs
# https://github.com/nodesource/distributions/blob/master/README.md
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
# docker
# https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce
# docker compose
#https://docs.docker.com/compose/install/
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
echo "END: Installing dependencies for Node, Docker and Docker Compose in DO"
@UlisesGascon
Copy link
Author

Direct Execution in terminal

bash <(curl -Ls https://gist.githubusercontent.com/UlisesGascon/ac6df52e470f9ee9c8e840448574193a/raw/a7fc88aa65142d0cf924c797f144729ecf88e238/do_setup.sh)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment