fix(api): entrypoint

This commit is contained in:
Gergő Móricz 2024-09-27 22:16:27 +02:00
parent e44bdf7a54
commit c6a83ab92c
2 changed files with 6 additions and 5 deletions

View File

@ -39,4 +39,4 @@ COPY --from=go-base /app/src/lib/go-html-to-md/html-to-markdown.so /app/dist/src
EXPOSE 8080 EXPOSE 8080
ENV PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium" ENV PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium"
# ENTRYPOINT "/app/docker-entrypoint.sh" ENTRYPOINT "/app/docker-entrypoint.sh"

View File

@ -7,12 +7,13 @@ else
echo ENTRYPOINT DID NOT RUN AS ROOT echo ENTRYPOINT DID NOT RUN AS ROOT
fi 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 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 node --max-old-space-size=8192 dist/src/services/queue-worker.js
else 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 node --max-old-space-size=8192 dist/src/index.js
fi fi