{"action":"created","issue":{"url":"https://api.github.com/repos/convox/rack/issues/484","repository_url":"https://api.github.com/repos/convox/rack","labels_url":"https://api.github.com/repos/convox/rack/issues/484/labels{/name}","comments_url":"https://api.github.com/repos/convox/rack/issues/484/comments","events_url":"https://api.github.com/repos/convox/rack/issues/484/events","html_url":"https://github.com/convox/rack/issues/484","id":144064292,"number":484,"title":"`convox start` host port conflicts","user":{"login":"mattmanning","id":44615,"avatar_url":"https://avatars.githubusercontent.com/u/44615?v=3","gravatar_id":"","url":"https://api.github.com/users/mattmanning","html_url":"https://github.com/mattmanning","followers_url":"https://api.github.com/users/mattmanning/followers","following_url":"https://api.github.com/users/mattmanning/following{/other_user}","gists_url":"https://api.github.com/users/mattmanning/gists{/gist_id}","starred_url":"https://api.github.com/users/mattmanning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattmanning/subscriptions","organizations_url":"https://api.github.com/users/mattmanning/orgs","repos_url":"https://api.github.com/users/mattmanning/repos","events_url":"https://api.github.com/users/mattmanning/events{/privacy}","received_events_url":"https://api.github.com/users/mattmanning/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/convox/rack/labels/priority","name":"priority","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/convox/rack/milestones/7","html_url":"https://github.com/convox/rack/milestones/Start","labels_url":"https://api.github.com/repos/convox/rack/milestones/7/labels","id":1651610,"number":7,"title":"Start","description":"All things local development","creator":{"login":"nzoschke","id":147410,"avatar_url":"https://avatars.githubusercontent.com/u/147410?v=3","gravatar_id":"","url":"https://api.github.com/users/nzoschke","html_url":"https://github.com/nzoschke","followers_url":"https://api.github.com/users/nzoschke/followers","following_url":"https://api.github.com/users/nzoschke/following{/other_user}","gists_url":"https://api.github.com/users/nzoschke/gists{/gist_id}","starred_url":"https://api.github.com/users/nzoschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzoschke/subscriptions","organizations_url":"https://api.github.com/users/nzoschke/orgs","repos_url":"https://api.github.com/users/nzoschke/repos","events_url":"https://api.github.com/users/nzoschke/events{/privacy}","received_events_url":"https://api.github.com/users/nzoschke/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":0,"state":"open","created_at":"2016-03-17T16:07:46Z","updated_at":"2016-05-03T15:39:09Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-03-28T19:42:45Z","updated_at":"2016-05-03T15:39:56Z","closed_at":null,"body":"One of our users has a `docker-compose.yml` that looks something like:\r\n\r\n```\r\nfoo:\r\n  ports:\r\n    - 80:3000\r\nbar:\r\n  ports:\r\n    - 80:3000\r\n```\r\n\r\nThis works fine in production because foo and bar will each have their own ELB, but when running locally with `convox start` there is a conflict on host port 80.\r\n\r\nHow can we change our tooling to improve the local development experience in this case?"},"comment":{"url":"https://api.github.com/repos/convox/rack/issues/comments/216570142","html_url":"https://github.com/convox/rack/issues/484#issuecomment-216570142","issue_url":"https://api.github.com/repos/convox/rack/issues/484","id":216570142,"user":{"login":"nzoschke","id":147410,"avatar_url":"https://avatars.githubusercontent.com/u/147410?v=3","gravatar_id":"","url":"https://api.github.com/users/nzoschke","html_url":"https://github.com/nzoschke","followers_url":"https://api.github.com/users/nzoschke/followers","following_url":"https://api.github.com/users/nzoschke/following{/other_user}","gists_url":"https://api.github.com/users/nzoschke/gists{/gist_id}","starred_url":"https://api.github.com/users/nzoschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzoschke/subscriptions","organizations_url":"https://api.github.com/users/nzoschke/orgs","repos_url":"https://api.github.com/users/nzoschke/repos","events_url":"https://api.github.com/users/nzoschke/events{/privacy}","received_events_url":"https://api.github.com/users/nzoschke/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T15:39:56Z","updated_at":"2016-05-03T15:39:56Z","body":"Copying @mattmanning's additional information in #573:\r\n\r\nI have a `docker-compose.yml` like this:\r\n\r\n```yaml\r\nweb:\r\n  links:\r\n    - db1\r\n    - db2\r\ndb1:\r\n  ports:\r\n    - 3306\r\ndb2:\r\n  ports:\r\n    - 3306\r\n```\r\n\r\nThe DB image I'm using wants to listen on port 3306 (MySQL). This configuration should be fine in production because each will get its own load balancer. However, locally with `convox start` both containers are started with `3306:3306` as the port mapping, causing a conflict on host port 3306.\r\n\r\nSince I'm using linking I don't really care what the host port is. I think this problem could be solved by choosing a random port for it in both cases."}}