firecrawl/apps/api/docker-entrypoint.sh
Tetsuro Yokoyama 5ac6eb7440
Update self-hosted Kubernetes deployments examples for compatibility and consistency (#1177)
* fix: Quote variables in `docker-entrypoint.sh`

- This commit adds double quotes around variables in the docker-entrypoint.sh script to prevent word splitting and globbing issues, ensuring the script behaves correctly in all cases.

* fix: Ensure worker/api deployment starts with `OPENAI_API_KEY`

* fix: Add missing `FLY_PROCESS_GROUP` env var to deployments

* fix: Correct `PLAYWRIGHT_MICROSERVICE_URL` in `firecrawl-config`

* fix: Update Docker build options for Apple Silicon compatibility

* fix: Correct `PLAYWRIGHT_MICROSERVICE_URL` in `firecrawl-config`
2025-02-18 13:33:20 +01:00

25 lines
713 B
Bash
Executable File

#!/bin/bash -e
if [ "$UID" -eq 0 ]; then
set +e # disable failing on errror
ulimit -n 65535
echo "NEW ULIMIT: $(ulimit -n)"
set -e # enable failing on error
else
echo ENTRYPOINT DID NOT RUN AS ROOT
fi
if [ "$FLY_PROCESS_GROUP" = "app" ]; then
echo "RUNNING app"
node --max-old-space-size=8192 dist/src/index.js
elif [ "$FLY_PROCESS_GROUP" = "worker" ]; then
echo "RUNNING worker"
node --max-old-space-size=8192 dist/src/services/queue-worker.js
elif [ "$FLY_PROCESS_GROUP" = "index-worker" ]; then
echo "RUNNING index worker"
node --max-old-space-size=8192 dist/src/services/indexing/index-worker.js
else
echo "NO FLY PROCESS GROUP"
node --max-old-space-size=8192 dist/src/index.js
fi