{"action":"created","issue":{"url":"https://api.github.com/repos/autopilotpattern/mysql/issues/9","repository_url":"https://api.github.com/repos/autopilotpattern/mysql","labels_url":"https://api.github.com/repos/autopilotpattern/mysql/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/autopilotpattern/mysql/issues/9/comments","events_url":"https://api.github.com/repos/autopilotpattern/mysql/issues/9/events","html_url":"https://github.com/autopilotpattern/mysql/pull/9","id":147876755,"number":9,"title":"Add explicit (separate) \"docker-swarm\" and \"triton\" docker-compose files","user":{"login":"tianon","id":161631,"avatar_url":"https://avatars.githubusercontent.com/u/161631?v=3","gravatar_id":"","url":"https://api.github.com/users/tianon","html_url":"https://github.com/tianon","followers_url":"https://api.github.com/users/tianon/followers","following_url":"https://api.github.com/users/tianon/following{/other_user}","gists_url":"https://api.github.com/users/tianon/gists{/gist_id}","starred_url":"https://api.github.com/users/tianon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianon/subscriptions","organizations_url":"https://api.github.com/users/tianon/orgs","repos_url":"https://api.github.com/users/tianon/repos","events_url":"https://api.github.com/users/tianon/events{/privacy}","received_events_url":"https://api.github.com/users/tianon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-12T21:20:45Z","updated_at":"2016-04-14T21:04:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/autopilotpattern/mysql/pulls/9","html_url":"https://github.com/autopilotpattern/mysql/pull/9","diff_url":"https://github.com/autopilotpattern/mysql/pull/9.diff","patch_url":"https://github.com/autopilotpattern/mysql/pull/9.patch"},"body":"Since Triton does not yet support `docker network`, this is the best solution for making sure this repository can function appropriately in both environments (uses `docker network` for Swarm and `--link` for Triton).\n\nWithout this, Swarm will see `--link` and co-schedule all the containers, which defeats the whole purpose of the demonstration."},"comment":{"url":"https://api.github.com/repos/autopilotpattern/mysql/issues/comments/210148396","html_url":"https://github.com/autopilotpattern/mysql/pull/9#issuecomment-210148396","issue_url":"https://api.github.com/repos/autopilotpattern/mysql/issues/9","id":210148396,"user":{"login":"tianon","id":161631,"avatar_url":"https://avatars.githubusercontent.com/u/161631?v=3","gravatar_id":"","url":"https://api.github.com/users/tianon","html_url":"https://github.com/tianon","followers_url":"https://api.github.com/users/tianon/followers","following_url":"https://api.github.com/users/tianon/following{/other_user}","gists_url":"https://api.github.com/users/tianon/gists{/gist_id}","starred_url":"https://api.github.com/users/tianon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianon/subscriptions","organizations_url":"https://api.github.com/users/tianon/orgs","repos_url":"https://api.github.com/users/tianon/repos","events_url":"https://api.github.com/users/tianon/events{/privacy}","received_events_url":"https://api.github.com/users/tianon/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T21:04:45Z","updated_at":"2016-04-14T21:04:45Z","body":"I think some of the Triton vs Swarm issues might make more sense in the context of a diff between the two:\r\n```diff\r\ndiff --git a/docker-swarm/docker-compose.yml b/triton/docker-compose.yml\r\nindex d282c07..89130e7 100644\r\n--- a/docker-swarm/docker-compose.yml\r\n+++ b/triton/docker-compose.yml\r\n@@ -6,8 +6,12 @@ services:\r\n         extends:\r\n             file: ../common-compose.yml\r\n             service: mysql\r\n+        network_mode: bridge\r\n+        links:\r\n+            - consul:consul\r\n \r\n     consul:\r\n         extends:\r\n             file: ../common-compose.yml\r\n             service: consul\r\n+        network_mode: bridge\r\n```\r\n\r\nThe addition of `links` is to combat the fact that Triton doesn't have DNS (which could use CNS given #11, but I'm honestly not convinced that's actually simpler since now my `_env` needs even more account-specific information in it that it didn't need before), and the addition of `network_mode` is to stop `docker-compose` from trying to create an overlay network (which fails outright on Triton).\r\n\r\nEven with that other approach, I don't see a simple way to get back to a single `docker-compose.yml` that works for both unless Triton implements some bits of the new Docker networking features. :disappointed:"}}