Skip to content

Commit

Permalink
fix(api): entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mogery committed Sep 27, 2024
1 parent e44bdf7 commit c6a83ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
ENTRYPOINT "/app/docker-entrypoint.sh"
9 changes: 5 additions & 4 deletions apps/api/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c6a83ab

Please sign in to comment.