Created
May 10, 2016 23:06
-
-
Save thornpig/345412463c99dc97837aeca61531663a to your computer and use it in GitHub Desktop.
Setup nodejs and mongodb instances on google compute engine
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
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