firecrawl/apps/api/docker-entrypoint.sh

25 lines
713 B
Bash
Raw Permalink Normal View History

2024-09-27 20:44:52 +02:00
#!/bin/bash -e
if [ "$UID" -eq 0 ]; then
set +e # disable failing on errror
2024-09-27 20:44:52 +02:00
ulimit -n 65535
echo "NEW ULIMIT: $(ulimit -n)"
set -e # enable failing on error
2024-09-27 20:44:52 +02:00
else
echo ENTRYPOINT DID NOT RUN AS ROOT
fi
if [ "$FLY_PROCESS_GROUP" = "app" ]; then
2024-09-27 22:16:27 +02:00
echo "RUNNING app"
2024-09-27 20:44:52 +02:00
node --max-old-space-size=8192 dist/src/index.js
elif [ "$FLY_PROCESS_GROUP" = "worker" ]; then
2024-09-27 22:16:27 +02:00
echo "RUNNING worker"
2024-09-27 20:44:52 +02:00
node --max-old-space-size=8192 dist/src/services/queue-worker.js
elif [ "$FLY_PROCESS_GROUP" = "index-worker" ]; then
2025-01-19 13:09:29 -03:00
echo "RUNNING index worker"
node --max-old-space-size=8192 dist/src/services/indexing/index-worker.js
2024-09-27 20:44:52 +02:00
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