codecombat/scripts/vagrant/fillMongo.sh
Barry Stump 7048b2bc08 Fix up vagrant config
* Use Ubuntu 14.04 box which supports both VMWare and Virtualbox
* Correctly set memory/CPU settings for vmware_fusion provider
* Use nodesource repo instead of deprecated chris-lea PPA for installing node.js
* Upgrade npm to latest version
* Correct permissions for provisioner script (npm module install)
2015-12-03 11:39:04 -08:00

17 lines
488 B
Bash
Executable file

#!/bin/bash
# Original content copyright (c) 2014 dpen2000 licensed under the MIT license
mkdir -p /vagrant/temp
cd /vagrant/temp
rm -f dump.tar.gz
rm -rf dump
echo "Downloading mongo dump file..."
wget --no-verbose http://analytics.codecombat.com:8080/dump.tar.gz
tar xzf dump.tar.gz --no-same-owner
echo "Restoring mongo dump file..."
mongorestore --quiet --drop
if [ -d /vagrant/temp/backup ]
then
echo "Restoring mongo backup..."
cd /vagrant/temp/backup
mongorestore --quiet
fi