version: '2' volumes: gems: driver: local services: rabbitmq: image: rabbitmq:latest environment: RABBITMQ_DEFAULT_USER: sapience RABBITMQ_DEFAULT_PASS: tests postgres: image: postgres:latest environment: POSTGRES_USER: sapience POSTGRES_PASSWORD: tests base: 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: # - vendor/bundle:/usr/local/bundle # 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: base 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 rails: extends: service: base working_dir: /usr/src/app/test_apps/rails entrypoint: /usr/src/app/dev-entrypoint.sh command: bundle exec rspec depends_on: - rabbitmq - postgres environment: APP_NAME: rails_app POSTGRES_HOST: postgres POSTGRES_USER: sapience POSTGRES_PASSWORD: tests 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 grape: extends: service: base working_dir: /usr/src/app/test_apps/grape entrypoint: /usr/src/app/dev-entrypoint.sh command: bundle exec rspec environment: APP_NAME: grape_app PATH: /usr/src/app/bin:/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin