Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
COMPOSE_PROJECT_NAME=operationcodebackend
REDIS_URL=redis://redis:6379/0
#RAILS_ENV=development
RAILS_ENV=development
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ services:

script:
- make build
- |
while ! psql --host=localhost --username=postgres -c 'SELECT 1'> /dev/null 2>&1; do
echo 'Waiting for postgres...'
sleep 1;
done;
- make test
- if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then make upgrade; fi

Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ ENV BUNDLE_GEMFILE=$APP_HOME/Gemfile \
RUN bundle install --system

ADD . $APP_HOME/

CMD ["bundle", "exec", "puma", "-C", "config/puma.rb"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ db_seed:
.PHONY: test
test: bg
docker-compose run operationcode-psql bash -c "while ! psql --host=operationcode-psql --username=postgres -c 'SELECT 1'; do sleep 5; done;"
docker-compose run ${RAILS_CONTAINER} bash -c 'RAILS_ENV=test bin/rails db:environment:set && rake db:test:prepare && RAILS_ENV=test bin/rails db:environment:set && rake test'
docker-compose run ${RAILS_CONTAINER} bash -c 'export RAILS_ENV=test && rake db:test:prepare && rake test'

.PHONY: bundle
bundle:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ version: '2'
services:
web:
build: .
entrypoint: ["lib/docker-entrypoint.sh"]
command: ["bundle", "exec", "puma", "-C", "config/puma.rb"]
command: bundle exec puma -C config/puma.rb
volumes:
- .:/app
volumes_from:
Expand Down Expand Up @@ -42,3 +41,4 @@ services:
- redis
env_file:
- .env

7 changes: 0 additions & 7 deletions lib/docker-entrypoint.sh

This file was deleted.

12 changes: 0 additions & 12 deletions test/lib/verify_db_test.rb

This file was deleted.