mirror of
https://github.com/chenasraf/opensnp.org-docker.git
synced 2026-05-17 17:48:10 +00:00
Move build step into own script (#27)
... so it works when deploying and running the tests.
This commit is contained in:
11
bin/build
Executable file
11
bin/build
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
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 build --build-arg SNPR_REV=$snpr_rev rails
|
||||
docker-compose build sidekiq
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
|
||||
bin/build
|
||||
|
||||
docker login
|
||||
docker push opensnp/rails
|
||||
docker push opensnp/rails-sidekiq
|
||||
|
||||
8
test/run
8
test/run
@@ -2,14 +2,8 @@
|
||||
|
||||
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
|
||||
bin/build
|
||||
|
||||
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'
|
||||
|
||||
Reference in New Issue
Block a user