version: '2.1' services: fusion-server: build: . command: yarn start --environment=development expose: - 3000 ports: - "3000:3000" network_mode: "host" healthcheck: test: ["CMD-SHELL", "curl -H \"Accept: text/html\" -f http://localhost:3000 || exit 1"] interval: 5s timeout: 10s retries: 5 chrome-standalone: image: selenium/standalone-chrome:latest@sha256:8ea147878016fb200dd07d92d39f11d6522707d630202a1b1c15d748a2bee06f network_mode: "host" restart: always ports: - "4444:4444" firefox-standalone: image: selenium/standalone-firefox:latest@sha256:2b782f3b99559fd9a3d6ccedbefa8ecb28d4828b7d5784243b52e15c65534bd3 network_mode: "host" restart: always ports: - "4444:4444" sauce-tunnel: image: henrrich/docker-sauce-connect:latest@sha256:9921657d1a3db8832f868ab25491363756abae52025a8d5af888aadc42ed31e9 restart: always expose: - 4445 ports: - 4445 network_mode: "host" command: ["-u", "${SAUCE_USERNAME}", "-k", "${SAUCE_ACCESS_KEY}", "-i", "${BUILDKITE_BUILD_NUMBER}", "-p"] environment: - SAUCE_USERNAME - SAUCE_ACCESS_KEY - BUILDKITE_BUILD_NUMBER healthcheck: test: ["CMD-SHELL", "grep -R \"Sauce Connect is up\" /tmp/sc-${BUILDKITE_BUILD_NUMBER}.log || exit 1"] interval: 5s timeout: 5m retries: 10 # docker-compose run does not wait on healthchecks, so proxy using this service. sauce-tunnel-healthy: build: . network_mode: "host" depends_on: sauce-tunnel: condition: service_healthy # wait for running server. fusion-server-healthy: build: . network_mode: "host" depends_on: fusion-server: condition: service_healthy # For running integration tests in CI browser-tests: build: . network_mode: "host" depends_on: - sauce-tunnel-healthy - fusion-server-healthy environment: - SAUCE_USERNAME - SAUCE_ACCESS_KEY - BUILDKITE_BUILD_NUMBER # For running linters and static analysis browser-tests-linters: build: . environment: - SAUCE_USERNAME - SAUCE_ACCESS_KEY - BUILDKITE_BUILD_NUMBER # For running integration tests locally in chrome browser-test-chrome: build: . network_mode: "host" depends_on: - chrome-standalone - fusion-server-healthy command: ./test-standalone.sh # For running integration tests locally in firefox browser-test-firefox: build: . network_mode: "host" depends_on: - firefox-standalone - fusion-server-healthy command: ./test-standalone.sh