-
Notifications
You must be signed in to change notification settings - Fork 23
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
Added environment variables to control bind address #23
base: master
Are you sure you want to change the base?
Conversation
# Run python script on display 0 | ||
DISPLAY=:99 python potoken-generator.py --bind 0.0.0.0 | ||
DISPLAY=:99 python potoken-generator.py --bind $HOST --port $PORT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no default value for $HOST. There is a need to have 0.0.0.0 as the host address.
Either you define this default value in the bash script or you pass it in the Dockerfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed via commit 778648d.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you instead make it simplier using this method: https://stackoverflow.com/questions/2013547/assigning-default-values-to-shell-variables-with-a-single-command-in-bash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will.
However, isn't that a bash
only feature? I thought sh
doesn't support that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha yes. Feel free to switch the shabang to ash since this is based on alpine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fulfilling wishes of #19.
This PR should allow to set the host and port of the webserver like so:
I can't test it in docker due to unfamiliarity with it but I know my shell scripting. hope this helps.