version: '2' volumes: gems: driver: local services: rabbitmq: image: rabbitmq:latest environment: RABBITMQ_DEFAULT_USER: sapience RABBITMQ_DEFAULT_PASS: tests rails: image: ruby:2.3 cpu_shares: 4 # Specify the directory from where all commands sent to the container will be # issued to where the code is mounted: working_dir: /usr/src/app # Keep the stdin open, so we can attach to our app container's process # and do things such as byebug, etc: stdin_open: true # Enable sending signals (CTRL+C, CTRL+P + CTRL+Q) into the container: tty: true volumes: # Mount our app code directory (".") into our app containers at the # "/usr/src/app" folder: - .:/usr/src/app # Mount the 'gems' volume on the folder that stores bundled gems: - gems:/usr/local/bundle rspec: extends: service: rails entrypoint: /usr/src/app/dev-entrypoint.sh command: bundle exec rake depends_on: - rabbitmq environment: CODECLIMATE_REPO_TOKEN: 204dc055302da6aed94379e249aa0645636d1d1794920c62db05c5fa968215de PATH: /usr/src/app/bin:/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin test_app: extends: service: rails working_dir: /usr/src/app/test_app entrypoint: /usr/src/app/dev-entrypoint.sh command: bundle exec rspec depends_on: - rabbitmq environment: AMQP: amqp://sapience:tests@rabbitmq:5672 PATH: /usr/src/app/bin:/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin