firecrawl/apps/api/docker-entrypoint.sh

20 lines
476 B
Bash
Raw Normal View History

2024-09-27 20:44:52 +02:00
#!/bin/bash -e
if [ $UID -eq 0 ]; then
ulimit -n 65535
echo "NEW ULIMIT: $(ulimit -n)"
else
echo ENTRYPOINT DID NOT RUN AS ROOT
fi
2024-09-27 22:16:27 +02:00
if [ $FLY_PROCESS_GROUP = "app" ]; then
echo "RUNNING app"
2024-09-27 20:44:52 +02:00
node --max-old-space-size=8192 dist/src/index.js
2024-09-27 22:16:27 +02:00
elif [ $FLY_PROCESS_GROUP = "worker" ]; then
echo "RUNNING worker"
2024-09-27 20:44:52 +02:00
node --max-old-space-size=8192 dist/src/services/queue-worker.js
else
2024-09-27 22:16:27 +02:00
echo "NO FLY PROCESS GROUP"
2024-09-27 20:44:52 +02:00
node --max-old-space-size=8192 dist/src/index.js
fi