diff --git a/Dockerfile b/Dockerfile index 8643737..7e3bad8 100755 --- a/Dockerfile +++ b/Dockerfile @@ -12,10 +12,15 @@ ARG TZ=America/New_York ENV USER=${USER} ENV TZ=${TZ} +ARG PROJECT_NAME +ENV PROJECT_NAME=${PROJECT_NAME} + ARG PROJECT_PATH=/app ENV PROJECT_PATH=${PROJECT_PATH} + ENV PYTHON_DEPS_PATH=/dependencies ENV PYTHONPATH="${PYTHONPATH}:${PYTHON_DEPS_PATH}" +ENV PYTHONUNBUFFERED=TRUE ENV LANGUAGE=en_US.UTF-8 ENV LANG=en_US.UTF-8 @@ -156,9 +161,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN echo ${USER} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USER} && \ chmod 0440 /etc/sudoers.d/${USER} -ARG PROJECT_NAME -ENV PROJECT_NAME=${PROJECT_NAME} - ENV DOTFILES_URL=https://github.com/ilude/dotfiles.git USER ${USER} diff --git a/app/app.py b/app/app.py index 7411e2e..17dad08 100644 --- a/app/app.py +++ b/app/app.py @@ -51,5 +51,9 @@ def index(): if os.environ.get("FLASK_DEBUG", "False") == "True": app.run(port=port, debug=True) else: - from waitress import serve - serve(app, host='0.0.0.0', port=port) \ No newline at end of file + import asyncio + from hypercorn.config import Config + from hypercorn.asyncio import serve + config = Config() + config.bind = [f"0.0.0.0:{port}"] + asyncio.run(serve(app, config)) diff --git a/requirements.txt b/requirements.txt index ab09922..e9662d7 100755 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ flask requests selenium pillow -waitress \ No newline at end of file +hypercorn \ No newline at end of file