Skip to content

Commit 9101263

Browse files
committed
Ensure that we've got a running database
1 parent 7bf7e74 commit 9101263

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

vagrant/bootstrap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ echo export EDITOR=vim >> $HOME/.bashrc
99
echo "listen_addresses = '*'" | tee -a /var/pgsql/data/postgresql.conf
1010
echo host all all 0.0.0.0/0 trust | tee -a /var/pgsql/data/pg_hba.conf
1111
sudo su postgres -c 'pg_ctl stop -D /var/pgsql/data 2>&1'
12-
sudo su postgres -c 'pg_ctl restart -D /var/pgsql/data 2>&1 &'
12+
sudo su postgres -c 'pg_ctl start -D /var/pgsql/data 2>&1 &'
1313
su -c "source /home/vagrant/web/vagrant/user-config.sh" vagrant

vagrant/user-config.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ bundle install
2727
# Setup .env
2828
cp .env.example .env -n
2929

30+
sudo su postgres -c 'pg_ctl stop -D /var/pgsql/data 2>&1'
31+
sudo su postgres -c 'pg_ctl start -D /var/pgsql/data 2>&1 &'
32+
33+
export DEV_POSTGRES_PORT=5432
34+
export REDIS_URL=redis://127.0.0.1:6379
35+
36+
bundle exec rake db:drop:all
3037
bundle exec rake db:create:all
3138
bundle exec rake db:setup
3239
bundle exec rake db:test:prepare

0 commit comments

Comments
 (0)