{"action":"created","issue":{"url":"https://api.github.com/repos/sclorg/nginx-container/issues/19","repository_url":"https://api.github.com/repos/sclorg/nginx-container","labels_url":"https://api.github.com/repos/sclorg/nginx-container/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/sclorg/nginx-container/issues/19/comments","events_url":"https://api.github.com/repos/sclorg/nginx-container/issues/19/events","html_url":"https://github.com/sclorg/nginx-container/pull/19","id":204457751,"number":19,"title":"Support for env var replacement","user":{"login":"wtrocki","id":981838,"avatar_url":"https://avatars.githubusercontent.com/u/981838?v=3","gravatar_id":"","url":"https://api.github.com/users/wtrocki","html_url":"https://github.com/wtrocki","followers_url":"https://api.github.com/users/wtrocki/followers","following_url":"https://api.github.com/users/wtrocki/following{/other_user}","gists_url":"https://api.github.com/users/wtrocki/gists{/gist_id}","starred_url":"https://api.github.com/users/wtrocki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wtrocki/subscriptions","organizations_url":"https://api.github.com/users/wtrocki/orgs","repos_url":"https://api.github.com/users/wtrocki/repos","events_url":"https://api.github.com/users/wtrocki/events{/privacy}","received_events_url":"https://api.github.com/users/wtrocki/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-01-31T23:44:34Z","updated_at":"2017-02-01T10:12:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sclorg/nginx-container/pulls/19","html_url":"https://github.com/sclorg/nginx-container/pull/19","diff_url":"https://github.com/sclorg/nginx-container/pull/19.diff","patch_url":"https://github.com/sclorg/nginx-container/pull/19.patch"},"body":"# Motivation\r\n\r\nAdd init script support. This script would be executed before launching nginx proxy and would allow to modify nginx configuration. Script can be used to replace environment variables or setup additional elements in image. Some examples and test provided.\r\n\r\n# Notes\r\n\r\nNginx configuration can contain variables that start with dollar which makes difficult to replace all placeholders. Using `envreplace` is still possible but we would need to specify list of the environment variables as input. Alternative solution would be to use sed to replace some placeholders but this would reduce visibility and IMHO make this more complex than it should be. \r\n\r\nI wanted to make this solution generic enough to be used for various use cases. One of the most common use cases for this container is to use it as proxy. To proxy to backends using dns names , dns setup is required. Unfortunately nginx using internal dns resolver and cannot relay on resolv.conf file.\r\n\r\nIn example for init script I have added solution for this problem - reading values from resolv.conf and injecting them into script as environment variables. It may be reasonable to include resolver directive into global script.\r\n\r\nImplementation for #18 "},"comment":{"url":"https://api.github.com/repos/sclorg/nginx-container/issues/comments/276619956","html_url":"https://github.com/sclorg/nginx-container/pull/19#issuecomment-276619956","issue_url":"https://api.github.com/repos/sclorg/nginx-container/issues/19","id":276619956,"user":{"login":"wtrocki","id":981838,"avatar_url":"https://avatars.githubusercontent.com/u/981838?v=3","gravatar_id":"","url":"https://api.github.com/users/wtrocki","html_url":"https://github.com/wtrocki","followers_url":"https://api.github.com/users/wtrocki/followers","following_url":"https://api.github.com/users/wtrocki/following{/other_user}","gists_url":"https://api.github.com/users/wtrocki/gists{/gist_id}","starred_url":"https://api.github.com/users/wtrocki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wtrocki/subscriptions","organizations_url":"https://api.github.com/users/wtrocki/orgs","repos_url":"https://api.github.com/users/wtrocki/repos","events_url":"https://api.github.com/users/wtrocki/events{/privacy}","received_events_url":"https://api.github.com/users/wtrocki/received_events","type":"User","site_admin":false},"created_at":"2017-02-01T10:12:34Z","updated_at":"2017-02-01T10:12:34Z","body":"@omron93 - Thanks for help on this one. I would try to fix and also extend tests now."}}
{"actor":{"display_login":"wtrocki"}}