{"action":"opened","issue":{"url":"https://api.github.com/repos/mwielgoszewski/doorman/issues/133","repository_url":"https://api.github.com/repos/mwielgoszewski/doorman","labels_url":"https://api.github.com/repos/mwielgoszewski/doorman/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/mwielgoszewski/doorman/issues/133/comments","events_url":"https://api.github.com/repos/mwielgoszewski/doorman/issues/133/events","html_url":"https://github.com/mwielgoszewski/doorman/issues/133","id":260346943,"number":133,"title":"Doorman docker + nginx configuration (502 Bad Gateway)","user":{"login":"newlog","id":950789,"avatar_url":"https://avatars0.githubusercontent.com/u/950789?v=4","gravatar_id":"","url":"https://api.github.com/users/newlog","html_url":"https://github.com/newlog","followers_url":"https://api.github.com/users/newlog/followers","following_url":"https://api.github.com/users/newlog/following{/other_user}","gists_url":"https://api.github.com/users/newlog/gists{/gist_id}","starred_url":"https://api.github.com/users/newlog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newlog/subscriptions","organizations_url":"https://api.github.com/users/newlog/orgs","repos_url":"https://api.github.com/users/newlog/repos","events_url":"https://api.github.com/users/newlog/events{/privacy}","received_events_url":"https://api.github.com/users/newlog/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-25T16:59:07Z","updated_at":"2017-09-25T16:59:07Z","closed_at":null,"author_association":"NONE","body":"Hi there,\r\n\r\nI'm having trouble trying to make Doorman work with Docker and Nginx to be able to access it remotely. I'm new to docker so I might be doing something quite dumb. I hope it's not the case...\r\n\r\nI run the Doorman docker container as:\r\n\r\n```\r\n# docker run -d -e DOORMAN_ENROLL_SECRET=<random_uuid_from_osquery_client> -e DOORMAN_SECRET_KEY=<invented_uuid> -e POSTGRES_USER=doorman -e POSTGRES_PASSWORD=<invented_pwd> -e POSTGRES_PORT=5432 -e POSTGRES_ENV_POSTGRES_PORT=<host_public_ip> -p 127.0.0.1:12345:5000 doorman\r\nef11e83e774fc39c778d1a67ee8132c640b8ef853c03259f872922d2d6b0f053\r\n\r\n```\r\n\r\nContainer listed as:\r\n\r\n```\r\n# docker container ls\r\nCONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                       NAMES\r\nef11e83e774f        doorman             \"runsvdir /etc/ser...\"   13 seconds ago      Up 10 seconds       127.0.0.1:12345->5000/tcp   elegant_mcclintock\r\n```\r\n\r\nNginx configuration:\r\n\r\n```\r\n# cat doorman \r\nserver {\r\n\tlisten 4433;\r\n\tssl on;\r\n\tssl_certificate /opt/doorman_nginx/certs/osquery_certificate.crt;\r\n\tssl_certificate_key /opt/doorman_nginx/certs/osquery_private.key;\r\n\r\n\tlocation / {\r\n\t\tproxy_pass https://127.0.0.1:12345;\r\n\t\tproxy_redirect off;\r\n\t\tproxy_set_header Host $host;\r\n\t\tproxy_set_header X-Real-IP $remote_addr;\r\n\t\tproxy_set_header X-Forwarded-For $remote_addr;\r\n\t\tproxy_set_header X-Forwarded-Proto $scheme;\r\n\t}\r\n}\r\n```\r\n\r\nWhen I access Doorman from the browser as https://ip:4433 I get a 502.\r\n\r\nThere are no errors in the error.log from nginx.\r\n\r\nJust want to mention that when I run the container with the previous command, it's when I input for the first time both postgres password and doorman secret key. Is that all right?\r\n\r\nNetstat shows me how port 5000 and 12345 are listening:\r\n\r\n```\r\ntcp        0      0 0.0.0.0:4433            0.0.0.0:*               LISTEN      off (0.00/0/0)\r\ntcp        0      0 127.0.0.1:12345         0.0.0.0:*               LISTEN      off (0.00/0/0)\r\n```\r\n\r\nAny ideas?"}}
{"actor":{"display_login":"newlog"}}