diff --git a/ci/ruby_tests/rake/env.test b/ci/ruby_tests/rake/env.test new file mode 100644 index 0000000..0ff38ca --- /dev/null +++ b/ci/ruby_tests/rake/env.test @@ -0,0 +1,5 @@ +MYSQL_HOST=mysql +MYSQL_DATABASE=dns_test +MYSQL_USER=dns +MYSQL_PASSWORD=test +SECRET_KEY_BASE=test diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml index 8a803e0..c9dc9cc 100644 --- a/docker-compose-ci.yml +++ b/docker-compose-ci.yml @@ -1,103 +1,110 @@ --- version: '2' services: mysql: image: mysql:5.5 env_file: - env environment: - MYSQL_RANDOM_ROOT_PASSWORD=yes powerdns: build: powerdns/. depends_on: - mysql ports: - '53:53' env_file: - env environment: - MYSQL_HOST=mysql webdns: build: webdns/. depends_on: - mysql ports: - '3000:3000' env_file: - env environment: - MYSQL_HOST=mysql - RAILS_ENV=development volumes: - ./data/webdns:/srv/webdns reverse-proxy: image: traefik command: --api --docker ports: - "81:80" - "8081:8080" volumes: - /var/run/docker.sock:/var/run/docker.sock webdns4_bundle_helper: build: ci/bundle_helper/. env_file: - env environment: - RAILS_ENV=test volumes: - ./data/webdns:/srv/webdns + mysql-rake-test: + image: mysql:5.5 + env_file: + - ci/ruby_tests/rake/env.test + environment: + - MYSQL_RANDOM_ROOT_PASSWORD=yes + webdns-rake-test: build: ci/ruby_tests/rake/. depends_on: - - mysql + - mysql-rake-test ports: - '3000:3000' env_file: - env environment: - MYSQL_HOST=mysql - RAILS_ENV=test volumes: - ./data/webdns:/srv/webdns webdns-rubocop-test: build: ci/ruby_tests/rubocop/. env_file: - env environment: - RAILS_ENV=test volumes: - ./data/webdns:/srv/webdns webdns-reek-test: build: ci/ruby_tests/reek/. env_file: - env environment: - RAILS_ENV=test volumes: - ./data/webdns:/srv/webdns webdns-browser-test: build: webdns/. depends_on: - mysql ports: - '3000:3000' env_file: - env environment: - MYSQL_HOST=mysql - RAILS_ENV=development volumes: - ./data/webdns:/srv/webdns labels: - traefik.frontend.rule=Host:web.dns.local user: ${CURRENT_UID}