{"action":"opened","issue":{"url":"https://api.github.com/repos/charypar/swarm-dashboard/issues/20","repository_url":"https://api.github.com/repos/charypar/swarm-dashboard","labels_url":"https://api.github.com/repos/charypar/swarm-dashboard/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/charypar/swarm-dashboard/issues/20/comments","events_url":"https://api.github.com/repos/charypar/swarm-dashboard/issues/20/events","html_url":"https://github.com/charypar/swarm-dashboard/issues/20","id":351150802,"node_id":"MDU6SXNzdWUzNTExNTA4MDI=","number":20,"title":"PORT default value on Docker","user":{"login":"anton-johansson","id":6347803,"node_id":"MDQ6VXNlcjYzNDc4MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/6347803?v=4","gravatar_id":"","url":"https://api.github.com/users/anton-johansson","html_url":"https://github.com/anton-johansson","followers_url":"https://api.github.com/users/anton-johansson/followers","following_url":"https://api.github.com/users/anton-johansson/following{/other_user}","gists_url":"https://api.github.com/users/anton-johansson/gists{/gist_id}","starred_url":"https://api.github.com/users/anton-johansson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anton-johansson/subscriptions","organizations_url":"https://api.github.com/users/anton-johansson/orgs","repos_url":"https://api.github.com/users/anton-johansson/repos","events_url":"https://api.github.com/users/anton-johansson/events{/privacy}","received_events_url":"https://api.github.com/users/anton-johansson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-16T10:42:44Z","updated_at":"2018-08-16T10:42:44Z","closed_at":null,"author_association":"NONE","body":"The `PORT` environment variable have a default value, see:\r\n\r\nhttps://github.com/charypar/swarm-dashboard/blob/master/server/index.js#L9\r\n```node\r\nconst port = process.env.PORT || 8080;\r\n```\r\n\r\nHowever, when running on Docker, it uses the `PORT` environment variable when setting up the `HEALTHCHECK`, and that one has no default value. This was very confusing for me and it took me a while to realize why the container just shut down. :)\r\n\r\nI think we should do one of the following:\r\n- Make sure the Docker health check has the same default value\r\n- Remove the default value from `index.js` and make it clear that it is mandatory"}}
{"actor":{"display_login":"anton-johansson"}}