mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-07-31 01:42:04 +08:00
Fix corepack and self hosting setup (#1131)
* Update Dockerfile Config corepack and pnpm * Update Dockerfile Try using this approach: https://github.com/pnpm/pnpm/issues/9029#issuecomment-2631400936 * Add ulimits command to docker compose * Remove ulimit from entrypoint * Add ulimit back to docker-entrypoint.sh This implements the proposed approach to not fail when the ulimit command can't run due to the environment * Resolve signature mismatch Resolves issue encountered when using docker compose up on a clean environment on an intel mac. This just adds the clean command to avoid leveraging any cached data before updating apt-get and installing ca-certificates --------- Co-authored-by: Nick Roth <nroth@dealnews.com> Co-authored-by: Gergő Móricz <mo.geryy@gmail.com>
This commit is contained in:
parent
73d19aa01b
commit
aa1e820d52
@ -1,4 +1,5 @@
|
||||
FROM node:20-slim AS base
|
||||
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
LABEL fly_launch_runtime="Node.js"
|
||||
@ -16,7 +17,7 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-l
|
||||
FROM base AS build
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||
|
||||
RUN apt-get update -qq && apt-get install -y ca-certificates && update-ca-certificates
|
||||
RUN apt-get clean && apt-get update -qq && apt-get install -y ca-certificates && update-ca-certificates
|
||||
RUN pnpm install
|
||||
RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN \
|
||||
bash -c 'export SENTRY_AUTH_TOKEN="$(cat /run/secrets/SENTRY_AUTH_TOKEN)"; if [ -z $SENTRY_AUTH_TOKEN ]; then pnpm run build:nosentry; else pnpm run build; fi'
|
||||
@ -53,4 +54,4 @@ ENV PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium"
|
||||
# Make sure the entrypoint script has the correct line endings
|
||||
RUN sed -i 's/\r$//' /app/docker-entrypoint.sh
|
||||
|
||||
ENTRYPOINT "/app/docker-entrypoint.sh"
|
||||
ENTRYPOINT "/app/docker-entrypoint.sh"
|
||||
|
@ -1,8 +1,10 @@
|
||||
#!/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
|
||||
|
@ -2,6 +2,10 @@ name: firecrawl
|
||||
|
||||
x-common-service: &common-service
|
||||
build: apps/api
|
||||
ulimits:
|
||||
nofile:
|
||||
soft: 65535
|
||||
hard: 65535
|
||||
networks:
|
||||
- backend
|
||||
extra_hosts:
|
||||
|
Loading…
x
Reference in New Issue
Block a user