Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward port 8000/sessions #1

Open
HannoSpreeuw opened this issue Feb 4, 2019 · 3 comments
Open

Forward port 8000/sessions #1

HannoSpreeuw opened this issue Feb 4, 2019 · 3 comments

Comments

@HannoSpreeuw
Copy link
Collaborator

HannoSpreeuw commented Feb 4, 2019

From bash within the Docker container one can enter
lynx localhost:8000/sessions
and you will see a web page.
lynx localhost:8000
will show a 404.

I am not able to forward 8000/sessions to outside the container by the simple
EXPOSE 8000 in the Dockerfile and the
-p 8000:8000 in the Docker run command.

@jspaaks
Copy link

jspaaks commented Feb 4, 2019

fair warning, I don't really understand any of this stuff but here goes with a few options:

  1. configure whatever is running to output under / instead of /sessions
  2. automatically redirect from / to /sessions
  3. use a (reverse?) proxy server, e.g. nginx. with a similar setup as I used here: https://github.com/research-software-directory/research-software-directory/blob/c239c16f67d2eb6069bf3c81923a3098cf06c3f4/config/nginx_proxy/nginx.conf#L28-L30 (you would only need that location and none of the others btw; also, replace graphs with sessions)
  4. default fallback: ask @sverhoeven or @Tommos0...

@HannoSpreeuw
Copy link
Collaborator Author

Thanks. I Googled a little more, because I think this should be dead simple. I.e. a one step solution should suffice.

I don't like the preferred solution from this SO link, i.e. the one from icecrime, because it seems complicated.

But I like the solution by Vasspilka much better because it seems simpler.
Still have to test it, though.

@HannoSpreeuw
Copy link
Collaborator Author

But I am having a hard time understanding Vasspilka's explanation.

I do understand the preferred answer from this SO link:

If you want to make a Unix domain socket available outside of your container, you will need to mount a host directory inside the container and then place the socket there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants