Skip to content

Commit

Permalink
Added MongoDB remote access functionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
stramel committed Jul 19, 2014
1 parent 28af886 commit 164a3c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ mysql_root_password = "root" # We'll assume user "root"
mysql_version = "5.5" # Options: 5.5 | 5.6
mysql_enable_remote = "false" # remote access enabled when true
pgsql_root_password = "root" # We'll assume user "root"
mongo_enable_remote = "false" # remote access enabled when true

# Languages and Packages
ruby_version = "latest" # Choose what ruby version should be installed (will also be the default version)
Expand Down Expand Up @@ -173,7 +174,7 @@ Vagrant.configure("2") do |config|
# config.vm.provision "shell", path: "#{github_url}/scripts/couchdb.sh"

# Provision MongoDB
# config.vm.provision "shell", path: "#{github_url}/scripts/mongodb.sh"
# config.vm.provision "shell", path: "#{github_url}/scripts/mongodb.sh", args: mongo_enable_remote

# Provision MariaDB
# config.vm.provision "shell", path: "#{github_url}/scripts/mariadb.sh", args: [mysql_root_password, mysql_enable_remote]
Expand Down
7 changes: 7 additions & 0 deletions scripts/mongodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ sudo apt-get update
# -qq implies -y --force-yes
sudo apt-get install -qq mongodb-org

# Make MongoDB connectable from outside world without SSH tunnel
if [ $1 == "true" ]; then
# enable remote access
# setting the mongodb bind_ip to allow connections from everywhere
sed -i "s/bind_ip = */bind_ip = 0.0.0.0/" /etc/mongod.conf
fi

# Test if PHP is installed
php -v > /dev/null 2>&1
PHP_IS_INSTALLED=$?
Expand Down

0 comments on commit 164a3c4

Please sign in to comment.