|
| 1 | +# This doesn't work yet |
| 2 | +version: "3" |
| 3 | + |
| 4 | +services: |
| 5 | + postgres: |
| 6 | + image: postgres |
| 7 | + healthcheck: |
| 8 | + test: psql postgres --command "select 1" -U postgres |
| 9 | + ports: |
| 10 | + - "5432:5432" |
| 11 | + environment: |
| 12 | + POSTGRES_USER: postgres |
| 13 | + POSTGRES_PASSWORD: postgres |
| 14 | + POSTGRES_DB: postgres |
| 15 | + |
| 16 | + init-postgres: |
| 17 | + build: . |
| 18 | + depends_on: |
| 19 | + - postgres |
| 20 | + environment: |
| 21 | + DATABASE_ADAPTER: docker_compose_postgres |
| 22 | + PACT_BROKER_HIDE_PACTFLOW_MESSAGES: 'true' |
| 23 | + INSTALL_PG: 'true' |
| 24 | + volumes: |
| 25 | + - ./lib:/home/lib |
| 26 | + - ./db:/home/db |
| 27 | + - ./tasks:/home/tasks |
| 28 | + - ./Rakefile:/home/Rakefile |
| 29 | + - ./config:/home/config |
| 30 | + command: dockerize --wait tcp://postgres:5432 /home/init-db.sh |
| 31 | + |
| 32 | + postgres-tests: |
| 33 | + build: . |
| 34 | + depends_on: |
| 35 | + - postgres |
| 36 | + environment: |
| 37 | + DATABASE_ADAPTER: docker_compose_postgres |
| 38 | + PACT_BROKER_HIDE_PACTFLOW_MESSAGES: 'true' |
| 39 | + INSTALL_PG: 'true' |
| 40 | + volumes: |
| 41 | + - ./lib:/home/lib |
| 42 | + - ./spec:/home/spec |
| 43 | + - ./db:/home/db |
| 44 | + - ./config.ru:/home/config.ru |
| 45 | + - ./tasks:/home/tasks |
| 46 | + - ./Rakefile:/home/Rakefile |
| 47 | + - ./config:/home/config |
| 48 | + - ./.rspec:/home/.rspec |
| 49 | + - ./.rubocop:/home/.rubocop |
| 50 | + - ./.gitignore:/home/.gitignore |
| 51 | + - ./public:/home/public |
| 52 | + |
| 53 | + mysql: |
| 54 | + image: mysql:5.7.28 |
| 55 | + command: --default-authentication-plugin=mysql_native_password |
| 56 | + environment: |
| 57 | + MYSQL_ROOT_PASSWORD: pact_broker |
| 58 | + MYSQL_DATABASE: pact_broker |
| 59 | + MYSQL_USER: pact_broker |
| 60 | + MYSQL_PASSWORD: pact_broker |
| 61 | + ports: |
| 62 | + - "3306:3306" |
| 63 | + |
| 64 | + init-mysql: |
| 65 | + build: . |
| 66 | + depends_on: |
| 67 | + - mysql |
| 68 | + environment: |
| 69 | + DATABASE_ADAPTER: docker_compose_mysql |
| 70 | + PACT_BROKER_HIDE_PACTFLOW_MESSAGES: 'true' |
| 71 | + INSTALL_MYSQL: 'true' |
| 72 | + volumes: |
| 73 | + - ./lib:/home/lib |
| 74 | + - ./db:/home/db |
| 75 | + - ./tasks:/home/tasks |
| 76 | + - ./Rakefile:/home/Rakefile |
| 77 | + - ./config:/home/config |
| 78 | + command: dockerize --wait tcp://mysql:3306 /home/init-db.sh |
| 79 | + |
| 80 | + mysql-tests: |
| 81 | + build: . |
| 82 | + depends_on: |
| 83 | + - mysql |
| 84 | + environment: |
| 85 | + DATABASE_ADAPTER: docker_compose_mysql |
| 86 | + PACT_BROKER_HIDE_PACTFLOW_MESSAGES: 'true' |
| 87 | + INSTALL_MYSQL: 'true' |
| 88 | + volumes: |
| 89 | + - ./lib:/home/lib |
| 90 | + - ./spec:/home/spec |
| 91 | + - ./db:/home/db |
| 92 | + - ./config.ru:/home/config.ru |
| 93 | + - ./tasks:/home/tasks |
| 94 | + - ./Rakefile:/home/Rakefile |
| 95 | + - ./config:/home/config |
| 96 | + - ./.rspec:/home/.rspec |
| 97 | + - ./.rubocop:/home/.rubocop |
| 98 | + - ./.gitignore:/home/.gitignore |
| 99 | + - ./public:/home/public |
| 100 | + |
0 commit comments