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

Support routing to custom container ports #20

Closed
lmakarov opened this issue Jan 12, 2018 · 1 comment
Closed

Support routing to custom container ports #20

lmakarov opened this issue Jan 12, 2018 · 1 comment
Assignees

Comments

@lmakarov
Copy link
Member

docksal-vhost-proxy only supports routing ports 80/443 on the host to ports 80/443 in containers.

In certain cases containers may have to use a different port. E.g. nodejs apps use port 3000 by default. Binding to privileged ports (80/443) requires running nodejs as root, which is not desirable.

This functionality exists in jwilder/nginx-proxy and can be borrowed from there:
https://github.com/jwilder/nginx-proxy#multiple-ports

@lmakarov
Copy link
Member Author

lmakarov commented Mar 9, 2018

This is available in docksal/vhost-proxy:edge and will be release in the next release (by end of month).

Example nodejs project utilizing this feature: https://github.com/docksal/example-nodejs

Example standalone nodejs container:

fin docker run -d --name=nodejs \
	-v $(pwd):/app \
	--label=io.docksal.virtual-host=nodejs.docksal \
	--label=io.docksal.virtual-port=3000 \
	--expose 3000 \
	node:alpine \
	node /app/index.js

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

No branches or pull requests

1 participant