iagopiimenta/transaction_retry_continued

View on GitHub
docker-compose.yml

Summary

Maintainability
Test Coverage
services:
  ruby_2_5: &ruby_2_5
    working_dir: /app
    build:
      context: .
      dockerfile: docker/ruby-2.5/Dockerfile
    volumes:
      - .:/app
    command: bash -c "bundle install && bundle exec rake test"
    environment:
      POSTGRESQL_DB_HOST: postgres
      POSTGRESQL_DB_USER: transaction_retry_continued
      POSTGRESQL_DB_PASS: database
      POSTGRESQL_DB_NAME: transaction_isolation_continued_test
      MYSQL_DB_HOST: mysql
      MYSQL_DB_USER: root
      MYSQL_DB_PASS: database
      MYSQL_DB_NAME: transaction_isolation_continued_test
    depends_on:
      - mysql
      - postgres
  ruby_2_7:
    <<: *ruby_2_5
    build:
      context: .
      dockerfile: docker/ruby-2.7/Dockerfile
  ruby_3_0:
    <<: *ruby_2_5
    command: ./docker/test-ruby-3.0.sh
    build:
      context: .
      dockerfile: docker/ruby-3.0/Dockerfile
  ruby_3_1:
    <<: *ruby_2_5
    command: ./docker/test-ruby-3.1.sh
    build:
      context: .
      dockerfile: docker/ruby-3.1/Dockerfile
  postgres:
    image: postgres:9.6
    environment:
      POSTGRES_USER: transaction_retry_continued
      POSTGRES_PASSWORD: database
      POSTGRES_DB: transaction_isolation_continued_test
    ports:
      - "5432:5432"
    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -q" ]
      interval: 5s
      timeout: 5s
      retries: 5
  mysql:
    image: biarms/mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD: database
      MYSQL_DATABASE: transaction_isolation_continued_test
    ports:
      - "3306:3306"
    healthcheck:
      test: "mysqladmin ping --host=0.0.0.0 --password=database --silent"