diff --git a/Dockerfile b/Dockerfile index 3fae0fb..f518831 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,4 @@ RUN pip install . EXPOSE 8080 -CMD [ "waitress-serve", "narrowcast_content:app"] \ No newline at end of file +CMD [ "python", "-m", "narrowcast_content.waitress_server"] \ No newline at end of file diff --git a/narrowcast_content/waitress_server.py b/narrowcast_content/waitress_server.py new file mode 100644 index 0000000..f87b69f --- /dev/null +++ b/narrowcast_content/waitress_server.py @@ -0,0 +1,10 @@ +from waitress import serve +from . import app +from paste.translogger import TransLogger + +serve(TransLogger(app, setup_console_handler=False), + host='0.0.0.0', + port=8080, + connection_limit=500, + threads=8, + ) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f5cae06..bb7ff99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,8 @@ dependencies = [ "spotipy", "icalendar", "waitress", + "PasteDeploy", + "paste", ] [build-system]