{"action":"created","issue":{"url":"https://api.github.com/repos/lunemec/nanny/issues/14","repository_url":"https://api.github.com/repos/lunemec/nanny","labels_url":"https://api.github.com/repos/lunemec/nanny/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/lunemec/nanny/issues/14/comments","events_url":"https://api.github.com/repos/lunemec/nanny/issues/14/events","html_url":"https://github.com/lunemec/nanny/pull/14","id":349935527,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3OTA1Mzg5","number":14,"title":"Added Docker deployment/configuration","user":{"login":"PhilipSchmid","id":5549063,"node_id":"MDQ6VXNlcjU1NDkwNjM=","avatar_url":"https://avatars3.githubusercontent.com/u/5549063?v=4","gravatar_id":"","url":"https://api.github.com/users/PhilipSchmid","html_url":"https://github.com/PhilipSchmid","followers_url":"https://api.github.com/users/PhilipSchmid/followers","following_url":"https://api.github.com/users/PhilipSchmid/following{/other_user}","gists_url":"https://api.github.com/users/PhilipSchmid/gists{/gist_id}","starred_url":"https://api.github.com/users/PhilipSchmid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhilipSchmid/subscriptions","organizations_url":"https://api.github.com/users/PhilipSchmid/orgs","repos_url":"https://api.github.com/users/PhilipSchmid/repos","events_url":"https://api.github.com/users/PhilipSchmid/events{/privacy}","received_events_url":"https://api.github.com/users/PhilipSchmid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2018-08-13T08:36:15Z","updated_at":"2018-08-14T07:46:36Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/lunemec/nanny/pulls/14","html_url":"https://github.com/lunemec/nanny/pull/14","diff_url":"https://github.com/lunemec/nanny/pull/14.diff","patch_url":"https://github.com/lunemec/nanny/pull/14.patch"},"body":"Hi there,\r\n\r\nI needed Nanny to be able to run as Docker container. Therefore I dockerized this simple but awesome tool. It would be nice to see this improvement merged into the official Nanny repository.\r\n\r\nAny feedback is welcome! Thanks.\r\n\r\nRegards,\r\nPhilip\r\n\r\nPS: It would also be nice to configure an official automated build job for this Docker image on the Docker Hub. @lunemec, can you set this up? This would allow people to simply run Nanny using a `docker run -d -v ${PWD}/nanny.toml:/nanny.toml -p 8080:8080 lunemec/nanny:0.3` command."},"comment":{"url":"https://api.github.com/repos/lunemec/nanny/issues/comments/412784489","html_url":"https://github.com/lunemec/nanny/pull/14#issuecomment-412784489","issue_url":"https://api.github.com/repos/lunemec/nanny/issues/14","id":412784489,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjc4NDQ4OQ==","user":{"login":"PhilipSchmid","id":5549063,"node_id":"MDQ6VXNlcjU1NDkwNjM=","avatar_url":"https://avatars3.githubusercontent.com/u/5549063?v=4","gravatar_id":"","url":"https://api.github.com/users/PhilipSchmid","html_url":"https://github.com/PhilipSchmid","followers_url":"https://api.github.com/users/PhilipSchmid/followers","following_url":"https://api.github.com/users/PhilipSchmid/following{/other_user}","gists_url":"https://api.github.com/users/PhilipSchmid/gists{/gist_id}","starred_url":"https://api.github.com/users/PhilipSchmid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhilipSchmid/subscriptions","organizations_url":"https://api.github.com/users/PhilipSchmid/orgs","repos_url":"https://api.github.com/users/PhilipSchmid/repos","events_url":"https://api.github.com/users/PhilipSchmid/events{/privacy}","received_events_url":"https://api.github.com/users/PhilipSchmid/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T07:46:36Z","updated_at":"2018-08-14T07:46:36Z","author_association":"NONE","body":"In which directory does the nanny binary search for the `nanny.toml`?\r\n\r\nWith debug enabled:\r\n```bash\r\nmacbookpro:nanny phil$ docker-compose up\r\nRecreating nanny_service_1 ... done\r\nAttaching to nanny_service_1\r\nservice_1  | {\"_t\":\"2018-08-14T07:42:50+0000\", \"_p\":\"1\", \"_l\":\"WRN\", \"_n\":\"~\", \"_m\":\"Config not found, using default stderr notifier.\"}\r\nservice_1  | {\"_t\":\"2018-08-14T07:42:50+0000\", \"_p\":\"1\", \"_l\":\"INF\", \"_n\":\"~\", \"_m\":\"Nanny listening\", \"addr\":\"\"}\r\nservice_1  | {\"_t\":\"2018-08-14T07:42:50+0000\", \"_p\":\"1\", \"_l\":\"FTL\", \"_n\":\"~\", \"_m\":\"Unable to start API server\", \"err\":\"listen tcp :80: bind: permission denied\", \"_c\":[\"nanny/cmd.runAPI() /go/src/nanny/cmd/root.go:189\",\"nanny/cmd.run() /go/src/nanny/cmd/root.go:97\",\"nanny/vendor/github.com/spf13/cobra.(*Command).execute() /go/src/nanny/vendor/github.com/spf13/cobra/command.go:766\",\"nanny/vendor/github.com/spf13/cobra.(*Command).ExecuteC() /go/src/nanny/vendor/github.com/spf13/cobra/command.go:852\",\"nanny/vendor/github.com/spf13/cobra.(*Command).Execute() /go/src/nanny/vendor/github.com/spf13/cobra/command.go:800\",\"nanny/cmd.Execute() /go/src/nanny/cmd/root.go:242\",\"main.main() /go/src/nanny/main.go:6\",\"runtime.main() /usr/local/go/src/runtime/proc.go:198\",\"runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:2361\"]}\r\nservice_1  | panic: listen tcp :80: bind: permission denied\r\nservice_1  | \r\nservice_1  | goroutine 1 [running]:\r\nservice_1  | nanny/vendor/github.com/mgutz/logxi.(*DefaultLogger).Fatal(0xc4202ffac0, 0xb5ac7b, 0x1a, 0xc420498360, 0x2, 0x2)\r\nservice_1  | \t/go/src/nanny/vendor/github.com/mgutz/logxi/defaultLogger.go:133 +0xf4\r\nservice_1  | nanny/vendor/github.com/mgutz/logxi.Fatal(0xb5ac7b, 0x1a, 0xc420498360, 0x2, 0x2)\r\nservice_1  | \t/go/src/nanny/vendor/github.com/mgutz/logxi/methods.go:30 +0x67\r\nservice_1  | nanny/cmd.runAPI()\r\nservice_1  | \t/go/src/nanny/cmd/root.go:189 +0x68a\r\nservice_1  | nanny/cmd.run(0x10e9f40, 0x114c110, 0x0, 0x0)\r\nservice_1  | \t/go/src/nanny/cmd/root.go:97 +0x35\r\nservice_1  | nanny/vendor/github.com/spf13/cobra.(*Command).execute(0x10e9f40, 0xc42008e1b0, 0x0, 0x0, 0x10e9f40, 0xc42008e1b0)\r\nservice_1  | \t/go/src/nanny/vendor/github.com/spf13/cobra/command.go:766 +0x2c1\r\nservice_1  | nanny/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x10e9f40, 0x1, 0x0, 0x10ea1a0)\r\nservice_1  | \t/go/src/nanny/vendor/github.com/spf13/cobra/command.go:852 +0x30a\r\nservice_1  | nanny/vendor/github.com/spf13/cobra.(*Command).Execute(0x10e9f40, 0xc420084058, 0x0)\r\nservice_1  | \t/go/src/nanny/vendor/github.com/spf13/cobra/command.go:800 +0x2b\r\nservice_1  | nanny/cmd.Execute()\r\nservice_1  | \t/go/src/nanny/cmd/root.go:242 +0x2d\r\nservice_1  | main.main()\r\nservice_1  | \t/go/src/nanny/main.go:6 +0x20\r\nnanny_service_1 exited with code 2\r\n```\r\n\r\nIf I add the command `ls -la /opt` inside the `docker-compose.yml` file, I see the `nanny.toml` and also with the correct permissions:\r\n```bash\r\nmacbookpro:nanny phil$ docker-compose up\r\nRecreating nanny_service_1 ... done\r\nAttaching to nanny_service_1\r\nservice_1  | total 16424\r\nservice_1  | drwxr-xr-x    1 nanny    nanny         4096 Aug 14 07:43 .\r\nservice_1  | drwxr-xr-x    1 root     root          4096 Aug 14 07:43 ..\r\nservice_1  | -rwxr-xr-x    1 nanny    nanny     16802480 Aug 14 06:57 nanny\r\nservice_1  | -rw-r--r--    1 nanny    nanny          572 Aug 14 07:18 nanny.toml\r\nnanny_service_1 exited with code 0\r\n```\r\n\r\nThanks.\r\n\r\nRegards,\r\nPhilip"}}
{"actor":{"display_login":"PhilipSchmid"}}