diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..91179a7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.12-alpine +COPY ./requirements.txt /app/requirements.txt +WORKDIR /app +RUN pip install -r requirements.txt +COPY . /app +EXPOSE 5000 +ENTRYPOINT ["gunicorn", "--config", "gunicorn_config.py", "app:app"] diff --git a/app.py b/app.py index c78faa9..f9d91e5 100644 --- a/app.py +++ b/app.py @@ -73,4 +73,5 @@ def search_for_doctors_with_params(): if __name__ == '__main__': - app.run() + serve(app, host="0.0.0.0", port=8080) + diff --git a/gunicorn_config.py b/gunicorn_config.py new file mode 100644 index 0000000..6c2c3b5 --- /dev/null +++ b/gunicorn_config.py @@ -0,0 +1,4 @@ +bind = "0.0.0.0:5000" +workers = 4 +threads = 4 +timeout = 120 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..34d339f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,21 @@ +annotated-types==0.7.0 +blinker==1.8.2 +certifi==2024.7.4 +charset-normalizer==3.3.2 +click==8.1.7 +dnspython==2.6.1 +email_validator==2.2.0 +Flask==3.0.3 +gunicorn==23.0.0 +idna==3.7 +itsdangerous==2.2.0 +Jinja2==3.1.4 +MarkupSafe==2.1.5 +packaging==24.1 +pydantic==2.8.2 +pydantic_core==2.20.1 +requests==2.32.3 +typing_extensions==4.12.2 +urllib3==2.2.2 +Werkzeug==3.0.3 +WTForms==3.1.2