diff options
| author | mo khan <mo@mokhan.ca> | 2014-10-31 12:02:29 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-10-31 12:02:29 -0600 |
| commit | 984d9852da21908beedf47bcee5cd1237a55a01d (patch) | |
| tree | 49929d0dabd62bfbfe90cb759d0505a13f386e2c | |
| parent | 1d3d0b47dc6a97c92e9832de9ea33a96bed45436 (diff) | |
install missing packages and create vagrant db.
| -rw-r--r-- | config/database.yml.vagrant | 15 | ||||
| -rw-r--r-- | script/bootstrap-vagrant-user.sh | 15 | ||||
| -rw-r--r-- | script/bootstrap.sh | 20 |
3 files changed, 42 insertions, 8 deletions
diff --git a/config/database.yml.vagrant b/config/database.yml.vagrant new file mode 100644 index 00000000..893f8915 --- /dev/null +++ b/config/database.yml.vagrant @@ -0,0 +1,15 @@ +development: + adapter: postgresql + encoding: unicode + database: cakeside + pool: 5 + username: vagrant + password: + +test: + adapter: postgresql + encoding: unicode + database: cakeside_test + pool: 5 + username: vagrant + password: diff --git a/script/bootstrap-vagrant-user.sh b/script/bootstrap-vagrant-user.sh index d517bd83..b74d2423 100644 --- a/script/bootstrap-vagrant-user.sh +++ b/script/bootstrap-vagrant-user.sh @@ -6,7 +6,18 @@ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-bu git clone https://github.com/tpope/rbenv-ctags.git ~/.rbenv/plugins/rbenv-ctags git clone https://github.com/rkh/rbenv-update.git ~/plugins/rbenv-update git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash +rbenv update rbenv install 2.1.4 -gem install bundler +rbenv global 2.1.4 +gem install bundler --no-ri --no-rdoc +rbenv rehash cd /vagrant -bundle install +bundle install -j 4 +rbenv rehash +if [ ! -f /vagrant/config/database.yml ]; then + ln -s config/database.yml.vagrant config/database.yml +fi +if [ ! -f /vagrant/.env ]; then + ln -s .env.example .env +fi +bundle exec rake db:create db:migrate db:seed diff --git a/script/bootstrap.sh b/script/bootstrap.sh index 186491a0..39aea0dc 100644 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -8,19 +8,27 @@ apt-get -y install zlib1g-dev libssl-dev apt-get -y install libreadline-gplv2-dev apt-get -y install libxml2 libxml2-dev libxslt1-dev apt-get -y install gawk libreadline6-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev +apt-get -y install build-essential +apt-get -y install tklib +apt-get -y install zlib1g-dev libssl-dev +apt-get -y install libreadline-gplv2-dev +apt-get -y install libxml2 libxml2-dev libxslt1-dev +apt-get -y install curl libcurl3 libcurl3-gnutls libcurl4-openssl-dev apt-get -y autoremove + add-apt-repository -y ppa:nginx/stable apt-get -y update apt-get -y install nginx + add-apt-repository -y ppa:pitti/postgresql apt-get -y update -apt-get -y install postgresql-9.3 libpq-dev +apt-get -y install postgresql-9.3 libpq-dev postgresql-contrib-9.3 + add-apt-repository -y ppa:chris-lea/node.js apt-get -y update apt-get -y install nodejs -apt-get -y install build-essential -apt-get -y install tklib -apt-get -y install zlib1g-dev libssl-dev -apt-get -y install libreadline-gplv2-dev -apt-get -y install libxml2 libxml2-dev libxslt1-dev + +su postgres<<EOF +createuser -s -e vagrant +EOF su -c "source /vagrant/script/bootstrap-vagrant-user.sh" vagrant |
