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

allow dockerfile to set the port for the flask application #8

Open
kymwatts opened this issue Apr 24, 2018 · 0 comments
Open

allow dockerfile to set the port for the flask application #8

kymwatts opened this issue Apr 24, 2018 · 0 comments

Comments

@kymwatts
Copy link
Contributor

kymwatts commented Apr 24, 2018

Hello,

in some cases, loading the docker container into a preexisting cluster can cause port conflicts.
Can you setup the flask app.py to use an environment variable for setting the port.

Is it possible to make these 2 changes:
app.py:
line 556
port = int(os.environ.get('FLASK_PORT','8080'))

Dockerfile:
line 20
ENV FLASK_PORT 8081
EXPOSE 8081

This way we can set a different port to launch the application on.

Cheers
Kym

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

1 participant