Skip to content

Commit dd6708d

Browse files
committed
Added helpers to make starting the app in one command easier
1 parent 8a1bf9e commit dd6708d

File tree

6 files changed

+21
-4
lines changed

6 files changed

+21
-4
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ GEM
254254
fog-softlayer (0.3.15)
255255
fog-core
256256
fog-json
257-
foreman (0.74.0)
257+
foreman (0.75.0)
258258
dotenv (~> 0.11.1)
259259
thor (~> 0.19.1)
260260
formatador (0.2.5)

Vagrantfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ puts custom_settings.inspect
1010

1111
VAGRANTFILE_API_VERSION = "2"
1212

13-
$box = 'coderwall'
14-
$box_url = 'https://s3.amazonaws.com/coderwall-assets-0/vagrant/coderwall.box' # The box is 1GB. Prepare your
13+
$box = 'coderwall_v2'
14+
$box_url = 'https://s3.amazonaws.com/coderwall-assets-0/vagrant/coderwall_v2.box' # The box is 1.4GB.
1515
$provision = 'vagrant/bootstrap.sh'
1616

1717
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

run.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vagrant ssh -c ". /home/vagrant/web/vagrant/run"

run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vagrant ssh -c ". /home/vagrant/web/vagrant/run"

vagrant/bootstrap.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ su -c '/usr/bin/pg_ctl start -l /var/pgsql/data/log/logfile -D /var/pgsql/data'
66

77
sudo su - vagrant <<-'EOF'
88
cd ~/web
9-
bundle check && bundle install
9+
bundle check || bundle install
10+
# Force the app to use the internal Postgres port number and ignore .env
1011
DEV_POSTGRES_PORT=5432 bundle exec rake db:migrate
1112
DEV_POSTGRES_PORT=5432 bundle exec rake db:test:prepare
1213
EOF

vagrant/run

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash -e
2+
3+
cd /home/vagrant/web
4+
5+
rvm current
6+
bundle check || bundle install
7+
bundle clean --force
8+
9+
bundle exec foreman check
10+
11+
bundle exec rake db:migrate
12+
bundle exec rake db:test:prepare
13+
14+
bundle exec foreman start all

0 commit comments

Comments
 (0)