forked from vhodges/dovetail
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·44 lines (31 loc) · 1.14 KB
/
setup.sh
File metadata and controls
executable file
·44 lines (31 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#! /bin/bash
# This script is intended to be run on a vagrant virtual machine.
# Create the database user and database for use by Dovetail.
sudo -u postgres createuser --createdb vagrant
# Update rbenv
cd ~/.rbenv && git pull
# Update ruby-build
cd ~/.rbenv/plugins/ruby-build && git pull
# Install ruby 2.3.0
rbenv install 2.3.0
# Set the default ruby version
rbenv global 2.3.0
# Core/Base gems
gem install bundler --no-ri --no-rdoc
gem install mailcatcher --no-ri --no-rdoc
gem install foreman --no-ri --no-rdoc
# Install upstart script for mailcather
sudo cp /vagrant/mailcatcher.conf /etc/init
# Start it up first time - it will run automatically on subsequent boots
sudo service mailcatcher start
# Install the app's libraries
cd /vagrant && bundle install
# The default sample database config Just Works(tm)
#
# ** Note will overwrite any existing database configuration file on the host side **
#
cp /vagrant/config/database-sample.yml /vagrant/config/database.yml
# Create the databases (Dev, test and prod)
cd /vagrant && bundle exec rake db:create
# Run the migrations to bring the schema upto date
cd /vagrant && bundle exec rake db:migrate