File tree 2 files changed +10
-60
lines changed
2 files changed +10
-60
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash -x
2
2
export DEBIAN_FRONTEND=noninteractive
3
- cd /home/vagrant
4
- echo Who am I? You are ` whoami` .
5
- echo Where am I? You are in ` pwd`
6
- echo I think my home is $HOME
7
- echo export EDITOR=vim >> $HOME /.bashrc
8
- # Enable accessing Postgres from the host machine
9
- apt-get -y install libcurl3 libcurl3-dev libcurl3-gnutls libcurl4-openssl-dev
10
- apt-get -y install libpq-dev
11
- apt-get -y install libxml2 libxml2-dev libxslt1-dev
12
- echo " listen_addresses = '*'" | tee -a /var/pgsql/data/postgresql.conf
13
- echo host all all 0.0.0.0/0 trust | tee -a /var/pgsql/data/pg_hba.conf
14
- sudo su postgres -c ' pg_ctl stop -D /var/pgsql/data 2>&1'
15
- sudo su postgres -c ' pg_ctl start -D /var/pgsql/data 2>&1 &'
16
- su -c " ln -s /vagrant /home/vagrant/web" vagrant
17
- su -c " source /home/vagrant/web/vagrant/user-config.sh" vagrant
3
+
4
+ # Ensure the database is started
5
+ su -c ' /usr/bin/pg_ctl start -l /var/pgsql/data/log/logfile -D /var/pgsql/data' postgres
6
+
7
+ sudo su - vagrant << -'EOF '
8
+ cd ~/web
9
+ bundle check && bundle install
10
+ DEV_POSTGRES_PORT=5432 bundle exec rake db:migrate
11
+ DEV_POSTGRES_PORT=5432 bundle exec rake db:test:prepare
12
+ EOF
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments