Skip to content

Commit

Permalink
새로운 환경으로 업데이트 중
Browse files Browse the repository at this point in the history
  • Loading branch information
mozodev committed Oct 26, 2014
1 parent f6523ce commit 173cb68
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# please see the online documentation at vagrantup.com.

# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "mozo/ansim.me"
config.vm.network "forwarded_port", guest: 3000, host: 3030
config.vm.box = "ubuntu/trusty32"
config.vm.network "forwarded_port", guest: 3000, host: 3000
# config.vm.synced_folder "../data", "/vagrant_data"

# Provider-specific configuration so you can fine-tune various
Expand All @@ -28,13 +28,34 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
#! /bin/bash
# Install build tools and korean language pack
sudo apt-get -qq install -y build-essential git-core language-pack-ko python-software-properties > /dev/null 2>&1
sudo apt-get -qq -y autoremove > /dev/null 2>&1
# Set timezone to seoul
echo 'Asia/Seoul' | sudo tee /etc/timezone
sudo dpkg-reconfigure -f noninteractive tzdata > /dev/null 2>&1
# Install mongodb
# from http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 > /dev/null 2>&1
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get -qq update > /dev/null 2>&1
sudo apt-get -qq -y install mongodb-org > /dev/null 2>&1
# restore mongodb dump
cd /tmp && curl -LO https://googledrive.com/host/0By0AzcV9f08-MFd3UUtfUFdza00/dump.tar.gz ; true
tar xvfz dump.tar.gz && rm dump.tar.gz
mongorestore --db goodclinic_development ./goodclinic_development --drop && rm -rf /tmp/goodclinic_development/ ; true
curl -L https://doc-0c-30-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/u5par7fcic5cv4cshvp4e7fu6t157hkm/1414281600000/09194925479248021352/\*/0B8WezMmea38UWlhNS1lyblk0bHc\?e\=download | tar xvz
mongorestore --db ansim_me_development ./dump/ansim_me_development
rm -rf ./dump/ansim_me_development
# Install nodejs & rbenv & ruby 2.1.2
sudo apt-add-repository -y ppa:chris-lea/node.js
sudo apt-get -y update
sudo apt-get install nodejs
# rails start!
cd /vagrant/ && rails s -d ; true
cd /vagrant/ && rails s -d
PID=$(ps -eo comm,pid | awk '$1 == "ruby" { print $2 }')
echo 'if you want to stop rails, kill -9 $PID"
Expand Down

0 comments on commit 173cb68

Please sign in to comment.