Files
opensnp.org-docker/test/run
Helge Rausch 9b1ed05a5f Fix CRON (#24)
* Use docker-compose to run database setup
* Build sidekiq image in test script
* Fix db migration startup script
* Let Runit deal with services

Sidekiq was started by a blocking script in my_init. This lead to the init process not getting to run Runit, which is in charge of CRON among other things. To fix it, I moved Sidekiq to be run by Runit as well. I also moved the postfix start script, while I was at it.
2022-11-23 15:09:34 +01:00

25 lines
503 B
Bash
Executable File

#!/usr/bin/env bash
set -x
snpr_rev="$SNPR_REV"
if [ -z "$snpr_rev" ]; then
snpr_rev=$(git ls-remote https://github.com/opensnp/snpr master | cut -f 1)
fi
docker-compose kill
docker-compose rm rails sidekiq
docker-compose build --build-arg SNPR_REV=$snpr_rev rails sidekiq
docker-compose up -d
docker-compose exec rails bash -l -c 'bundle exec rake db:reset'
wget -O - --retry-connrefused -T 60 http://${HOST:-localhost}:8080/
status=$?
docker-compose logs
docker-compose rm -sfv
exit $status