Files
opensnp.org-docker/test/run
Helge Rausch 3cc18990b8 Less places with ruby versions (#2)
* Reduce number of places where Ruby versions are specified

* Add TravisCI config

* Let's see which Ruby the app user uses

* Set Ruby version as app user

* Use full path for calling rvm

* Same but different

* Use rvm Ruby throughout

* Try setting up Postgres on TravisCI

* Remove passenger_ruby nginx directive

It should be the default... maybe...

* fixup! Try setting up Postgres on TravisCI

* Use Docker Compose

* Don't wait 10 seconds

* Try multiple times before drawing conclusions

* Explicitly set a password for postgres

* Try pruning volumes

* Also retry db setup if request failed

* Do we actually need to build before up?

* Move empty lines around

* Turns out, no sudo needed
2018-01-07 10:41:17 -08:00

25 lines
394 B
Bash
Executable File

#!/usr/bin/env bash
POSTGRES_DATA_DIR=test/postgres-data
set -x
mkdir $POSTGRES_DATA_DIR
docker-compose up -d
i=10
while
docker exec -ti opensnporgdocker_rails_1 bash -l -c 'bundle exec rake db:reset'
curl -sf "http://localhost:8080/" > /dev/null
status=$?
[ $status -ne 0 -a $i -gt 0 ]
do
sleep 1
i=$((i-1))
done
docker-compose rm -sfv
rm -rf $POSTGRES_DATA_DIR
exit $status