Skip to content

Commit

Permalink
Merge branch 'fix-missing-steps-jenkins' of https://github.com/public…
Browse files Browse the repository at this point in the history
…lab/mapknitter into development
  • Loading branch information
alaxalves committed Jul 16, 2019
2 parents 431164d + 63c6a59 commit 2abced6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ build:
cp config/amazon_s3.yml.example config/amazon_s3.yml
cp config/config.yml.example config/config.yml
cp db/schema.rb.example db/schema.rb
docker-compose down --remove-orphans
docker-compose build

deploy-container:
Expand All @@ -16,7 +15,12 @@ deploy-container:
done;

redeploy-container:
docker-compose down --remove-orphans
docker volume rm -f mapknitter_yarn_cache mapknitter_bundle_cache
docker-compose up --force-recreate -d
docker exec -it -e DISABLE_DATABASE_ENVIRONMENT_CHECK=1mapknitter bash -lc\
"bundle exec rails db:reset && \
bundle exec rails db:migrate"
while ! docker logs mapknitter | grep "web server started"; do\
echo "Serving Mapknitter";\
sleep 10;\
Expand Down
5 changes: 1 addition & 4 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ bundle check || bundle install

if bundle exec rails db:exists; then
>&2 echo "Database exists, only migrating it..."
# bundle exec rails db:migrate
bundle exec rails db:reset DISABLE_DATABASE_ENVIRONMENT_CHECK=1
DISABLE_DATABASE_ENVIRONMENT_CHECK=1 bump_database
bundle exec rails db:migrate
else
>&2 echo "Database doesn't exist, creating and migrating it..."
bundle exec rails db:create
Expand All @@ -21,7 +19,6 @@ fi

bundle exec rails assets:precompile


if [ -f $pidfile ] ; then
>&2 echo 'Server PID file already exists. Removing it...';
rm $pidfile;
Expand Down

0 comments on commit 2abced6

Please sign in to comment.