fix: increase ulimit -n in docker
This commit is contained in:
parent
d5e2a80e4a
commit
f0a1a2e45b
|
@ -38,3 +38,5 @@ COPY --from=go-base /app/src/lib/go-html-to-md/html-to-markdown.so /app/dist/src
|
||||||
# Start the server by default, this can be overwritten at runtime
|
# Start the server by default, this can be overwritten at runtime
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
ENV PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium"
|
ENV PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium"
|
||||||
|
|
||||||
|
ENTRYPOINT "/app/docker-entrypoint.sh"
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/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
|
||||||
|
|
||||||
|
if [ $FLY_PROCESS_GROUP -eq "app" ]; then
|
||||||
|
node --max-old-space-size=8192 dist/src/index.js
|
||||||
|
elif [ $FLY_PROCESS_GROUP -eq "worker" ]; then
|
||||||
|
node --max-old-space-size=8192 dist/src/services/queue-worker.js
|
||||||
|
else
|
||||||
|
echo "NO FLY PROCESS GROUP, RUNNING app BY DEFAULT"
|
||||||
|
node --max-old-space-size=8192 dist/src/index.js
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue