From c6a83ab92cc6bc93ba5d5fe073b2d1248973d6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Fri, 27 Sep 2024 22:16:27 +0200 Subject: [PATCH] fix(api): entrypoint --- apps/api/Dockerfile | 2 +- apps/api/docker-entrypoint.sh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index 50cae45..22aa995 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -39,4 +39,4 @@ COPY --from=go-base /app/src/lib/go-html-to-md/html-to-markdown.so /app/dist/src EXPOSE 8080 ENV PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium" -# ENTRYPOINT "/app/docker-entrypoint.sh" \ No newline at end of file +ENTRYPOINT "/app/docker-entrypoint.sh" \ No newline at end of file diff --git a/apps/api/docker-entrypoint.sh b/apps/api/docker-entrypoint.sh index 21122b0..269e982 100755 --- a/apps/api/docker-entrypoint.sh +++ b/apps/api/docker-entrypoint.sh @@ -7,12 +7,13 @@ else echo ENTRYPOINT DID NOT RUN AS ROOT fi -if [ $FLY_PROCESS_GROUP -eq "app" ]; then +if [ $FLY_PROCESS_GROUP = "app" ]; then + echo "RUNNING app" node --max-old-space-size=8192 dist/src/index.js -elif [ $FLY_PROCESS_GROUP -eq "worker" ]; then +elif [ $FLY_PROCESS_GROUP = "worker" ]; then + echo "RUNNING worker" node --max-old-space-size=8192 dist/src/services/queue-worker.js else - echo "NO FLY PROCESS GROUP, RUNNING app BY DEFAULT" + echo "NO FLY PROCESS GROUP" node --max-old-space-size=8192 dist/src/index.js fi -