Skip to content

Instantly share code, notes, and snippets.

@thornpig
Created May 10, 2016 23:06
Show Gist options
  • Save thornpig/345412463c99dc97837aeca61531663a to your computer and use it in GitHub Desktop.
Save thornpig/345412463c99dc97837aeca61531663a to your computer and use it in GitHub Desktop.
Setup nodejs and mongodb instances on google compute engine
ssh to node server
sudo apt-get update
sudo apt-get install git nodejs npm supervisor
ssh to mongodb server
sudo vi /etc/mongod.conf
change binip to 0.0.0.0
on dev terminal
gcloud compute firewall-rules create default-allow-mongo \
--allow tcp:27017 \
--source-ranges 0.0.0.0/0 \
--target-tags mongodb \
--description "Allow mongodb access to all IPs"
don't forget to add "mongodb" tag to mongodb instance on GCE console.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment