Created
November 16, 2018 16:42
-
-
Save LuisErnestoZamb/b2bd92c2308b53b867e2a69ba6337d05 to your computer and use it in GitHub Desktop.
Adding TDD on rails + docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
webtest: | |
build: | |
context: . | |
dockerfile: doc/docker-conf/web/Dockerfile-test | |
volumes: | |
- .:/usr/src/app | |
command: bash -c "bundle check || bundle install; rm -f /usr/src/app/tmp/pids/server.pid ; rails s -p 3000 -b 0.0.0.0" | |
environment: | |
- RACK_ENV=test | |
- RAILS_ENV=test | |
- REDIS_HOST=redis | |
- REDIS_PORT=6379 | |
links: | |
- redis_db:redis | |
ports: | |
- '8082:3000' | |
expose: | |
- "8082" | |
redis_db: | |
image: 'redis:3.2.3-alpine' | |
command: redis-server | |
workertest: | |
build: | |
context: . | |
dockerfile: doc/docker-conf/sidekiq/Dockerfile-test | |
volumes: | |
- .:/usr/src/sidekiq | |
command: bash -c "bundle check || bundle install; rm -f /usr/src/app/tmp/pids/sidekiq.pid; bundle exec sidekiq" | |
links: | |
- redis_db:redis | |
environment: | |
- [email protected] | |
- RACK_ENV=test | |
- RAILS_ENV=test | |
- REDIS_HOST=redis | |
- REDIS_PORT=6379 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Later execute:
docker-compose -f docker-compose-test.yml exec workertest bundle exec guard