diff --git a/Dockerfile b/Dockerfile index ce16037..9558607 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,12 @@ FROM python:3.8-slim # referencing docker compose (find wiki) # ENV PORT ${PORT} +ENV HOST ${HOST} WORKDIR /app COPY . . RUN pip install -r requirements.txt -EXPOSE 8060 +EXPOSE ${PORT} # run dash application CMD ["python3", "main.py"] \ No newline at end of file diff --git a/main.py b/app.py similarity index 71% rename from main.py rename to app.py index d4f7a06..aec9eb0 100644 --- a/main.py +++ b/app.py @@ -1,4 +1,5 @@ # import < +from os import environ from source.frontend.layout import layout from source.frontend.callbacks import callbacks from source.configuration import (application, server) @@ -7,6 +8,9 @@ if (__name__ == '__main__'): + + host = environ.get('HOST') + port = environ.get('PORT') objLayout = layout() objCallbacks = callbacks() @@ -14,5 +18,5 @@ objCallbacks.register() application.layout = objLayout.layout - application.run(host = '0.0.0.0', port = 8060) + application.run(host = host, port = port) \ No newline at end of file