From 56275bca0808fa024fe50dfa3c1c2e93ed945371 Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Date: Fri, 25 Aug 2023 03:59:33 -0300 Subject: [PATCH] Fixes Rq in Docker Container --- Dockerfile | 2 +- run-queue.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8a05f55..6fc1229 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,4 +61,4 @@ WORKDIR $PYSETUP_PATH EXPOSE 5000-9000 # Run your app -CMD [ "python", "-m", "storage_service" ] \ No newline at end of file +CMD [ "./run-queue.sh" ] \ No newline at end of file diff --git a/run-queue.sh b/run-queue.sh index 3f1d882..283b925 100755 --- a/run-queue.sh +++ b/run-queue.sh @@ -1,6 +1,10 @@ #!/bin/sh - -rq worker --with-scheduler +if [[ $1 == "--queue" || $1 == "-q" ]]; then + rq worker --with-scheduler + exit 0 +else + python -m storage_service +fi exec "$@" \ No newline at end of file