{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/4420","repository_url":"https://api.github.com/repos/docker/compose","labels_url":"https://api.github.com/repos/docker/compose/issues/4420/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/4420/comments","events_url":"https://api.github.com/repos/docker/compose/issues/4420/events","html_url":"https://github.com/docker/compose/issues/4420","id":205024694,"number":4420,"title":"docker-compose run: healthcheck not detecting if one of the services failed to start","user":{"login":"cmaftuleac","id":11699604,"avatar_url":"https://avatars.githubusercontent.com/u/11699604?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaftuleac","html_url":"https://github.com/cmaftuleac","followers_url":"https://api.github.com/users/cmaftuleac/followers","following_url":"https://api.github.com/users/cmaftuleac/following{/other_user}","gists_url":"https://api.github.com/users/cmaftuleac/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaftuleac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaftuleac/subscriptions","organizations_url":"https://api.github.com/users/cmaftuleac/orgs","repos_url":"https://api.github.com/users/cmaftuleac/repos","events_url":"https://api.github.com/users/cmaftuleac/events{/privacy}","received_events_url":"https://api.github.com/users/cmaftuleac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-02-02T23:08:20Z","updated_at":"2017-02-02T23:26:33Z","closed_at":null,"body":"Basically I have the following docker-compose file\r\nBy default tests run a noop, and manually I run them using:\r\n    docker-compose run tests runtest_command.sh\r\n\r\nIt works fine, the tests service wait for the app to start, and so on.\r\nBut if there is an error in starting of the 'app' service and is has failed to start, then the 'tests' service starts anyway, not regarding to the fact that 'app' container is dead.\r\n\r\n\r\n```\r\nversion: '2.1'\r\n\r\nvolumes:\r\n  mavencache: {}\r\n\r\nservices:\r\n  schema:\r\n    build: schema\r\n    links:\r\n      - mysqldb\r\n    environment:\r\n      - MYSQL_HOST=mysqldb\r\n      - MYSQL_USER=root\r\n      - MYSQL_PASSWORD=dbpassword123\r\n      - MYSQL_DATABASE=pvwebdb\r\n    depends_on:\r\n      mysqldb:\r\n        condition: service_healthy\r\n\r\n  app:\r\n    build:\r\n      context: .\r\n      dockerfile: Dockerfile.pvweb\r\n    volumes:\r\n      - mavencache:/root/.m2\r\n    ports:\r\n      - \"5005:5005\"\r\n      - \"8585:8585\"\r\n      - \"8586:8586\"\r\n    links:\r\n      - schema\r\n    healthcheck:\r\n      test: \"curl -f http://localhost:8585/login\"\r\n      interval: 1s\r\n      retries: 120\r\n    depends_on:\r\n      mysqldb:\r\n        condition: service_healthy\r\n\r\n  tests:\r\n    build:\r\n      context: .\r\n      dockerfile: Dockerfile.tests\r\n    volumes:\r\n      - mavencache:/root/.m2\r\n    links:\r\n      - app\r\n    depends_on:\r\n      app:\r\n        condition: service_started\r\n      mysqldb:\r\n        condition: service_healthy\r\n\r\n  mysqldb:\r\n    build:\r\n      context: .\r\n      dockerfile: Dockerfile.mysqldb\r\n    environment:\r\n      - MYSQL_ROOT_PASSWORD=dbpassword123\r\n    ports:\r\n      - \"3306:3306\"\r\n    healthcheck:\r\n      test: \"nc -z localhost 3306\"\r\n      interval: 1s\r\n      retries: 120\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/277117647","html_url":"https://github.com/docker/compose/issues/4420#issuecomment-277117647","issue_url":"https://api.github.com/repos/docker/compose/issues/4420","id":277117647,"user":{"login":"cmaftuleac","id":11699604,"avatar_url":"https://avatars.githubusercontent.com/u/11699604?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaftuleac","html_url":"https://github.com/cmaftuleac","followers_url":"https://api.github.com/users/cmaftuleac/followers","following_url":"https://api.github.com/users/cmaftuleac/following{/other_user}","gists_url":"https://api.github.com/users/cmaftuleac/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaftuleac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaftuleac/subscriptions","organizations_url":"https://api.github.com/users/cmaftuleac/orgs","repos_url":"https://api.github.com/users/cmaftuleac/repos","events_url":"https://api.github.com/users/cmaftuleac/events{/privacy}","received_events_url":"https://api.github.com/users/cmaftuleac/received_events","type":"User","site_admin":false},"created_at":"2017-02-02T23:26:33Z","updated_at":"2017-02-02T23:26:33Z","body":"the workaround by using a proxy dependency does not seem to work..."}}
{"actor":{"display_login":"cmaftuleac"}}