{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/homestead/issues/192","labels_url":"https://api.github.com/repos/laravel/homestead/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/laravel/homestead/issues/192/comments","events_url":"https://api.github.com/repos/laravel/homestead/issues/192/events","html_url":"https://github.com/laravel/homestead/pull/192","id":69356058,"number":192,"title":"Allow overriding default Homestead ports","user":{"login":"andrewhood125","id":1624718,"avatar_url":"https://avatars.githubusercontent.com/u/1624718?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewhood125","html_url":"https://github.com/andrewhood125","followers_url":"https://api.github.com/users/andrewhood125/followers","following_url":"https://api.github.com/users/andrewhood125/following{/other_user}","gists_url":"https://api.github.com/users/andrewhood125/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewhood125/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewhood125/subscriptions","organizations_url":"https://api.github.com/users/andrewhood125/orgs","repos_url":"https://api.github.com/users/andrewhood125/repos","events_url":"https://api.github.com/users/andrewhood125/events{/privacy}","received_events_url":"https://api.github.com/users/andrewhood125/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-18T22:39:16Z","updated_at":"2015-04-23T02:52:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/laravel/homestead/pulls/192","html_url":"https://github.com/laravel/homestead/pull/192","diff_url":"https://github.com/laravel/homestead/pull/192.diff","patch_url":"https://github.com/laravel/homestead/pull/192.patch"},"body":"PR #188 discussed having a syntax like this available in `Homestead.yaml` to override the default ports. \r\n```YAML\r\nports:\r\n  - map: 80\r\n    to: 8000\r\n``` \r\n\r\nHomestead already has support for the following structure: \r\n```YAML\r\nports:\r\n  - guest: 80\r\n    host: 8000\r\n``` \r\n\r\nThis PR allows the default ports to be overridden. If they are not overridden then the default port forwarding takes place preserving backwards compatibility."},"comment":{"url":"https://api.github.com/repos/laravel/homestead/issues/comments/95401925","html_url":"https://github.com/laravel/homestead/pull/192#issuecomment-95401925","issue_url":"https://api.github.com/repos/laravel/homestead/issues/192","id":95401925,"user":{"login":"andrewhood125","id":1624718,"avatar_url":"https://avatars.githubusercontent.com/u/1624718?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewhood125","html_url":"https://github.com/andrewhood125","followers_url":"https://api.github.com/users/andrewhood125/followers","following_url":"https://api.github.com/users/andrewhood125/following{/other_user}","gists_url":"https://api.github.com/users/andrewhood125/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewhood125/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewhood125/subscriptions","organizations_url":"https://api.github.com/users/andrewhood125/orgs","repos_url":"https://api.github.com/users/andrewhood125/repos","events_url":"https://api.github.com/users/andrewhood125/events{/privacy}","received_events_url":"https://api.github.com/users/andrewhood125/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T02:52:45Z","updated_at":"2015-04-23T02:52:45Z","body":"I disagree with adding `default_ports`. I feel like it's an unnecessary complication. You're still going to be adding complexity to the code checking to see if `default_ports: true` or `false`. Yet the configuration is less intuitive and more complicated. \r\n\r\nUse case: A user wants to change just MySQL port forwarding from `3306 => 33060` to `3306 => 3307`. \r\n\r\nWith `default_ports` your `Homestead.yaml` would look like this: \r\n```YAML\r\ndefault_ports: false\r\nports:\r\n  - map: 3306\r\n    to: 3307\r\n  - map: 80\r\n    to: 8000\r\n  - map: 5432\r\n    to: 54320\r\n  - map: 443\r\n    to: 4430\r\n```\r\n\r\nWith this PR it would be:\r\n```YAML\r\nports:\r\n  - map: 3306\r\n    to: 3307\r\n```\r\nIf you want custom ports and just to change just MySQL, then you would need to manually add all the default port forwarding. "}}