diff --git a/src/api/Dockerfile b/src/api/Dockerfile index 2813416..b57edc6 100644 --- a/src/api/Dockerfile +++ b/src/api/Dockerfile @@ -16,7 +16,8 @@ RUN pip3 install -r requirements-pydantic-pin.txt RUN pip3 install https://github.com/datarhei/core-client-python/archive/refs/tags/1.1.0.tar.gz COPY . . +RUN chmod +x start.sh EXPOSE 8080 -CMD [ "waitress-serve", "--port=8080", "--trusted-proxy", "*", "--trusted-proxy-headers", "forwarded", "--log-untrusted-proxy-headers", "--threads", "16", "--call", "api:create_app" ] \ No newline at end of file +ENTRYPOINT [ "start.sh" ] \ No newline at end of file diff --git a/src/api/start.sh b/src/api/start.sh new file mode 100644 index 0000000..a62b546 --- /dev/null +++ b/src/api/start.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +waitress-serve --port=8080 --trusted-proxy='*' \ +--trusted-proxy-headers="x-forwarded-for","x-forwarded-host","x-forwarded-proto","x-forwarded-port" \ +--log-untrusted-proxy-headers --threads=16 --call api:create_app \ No newline at end of file