Skip to content

Commit 6d18764

Browse files
Work Flow Managerclaude
andcommitted
Optimize Dockerfile for better build reliability
- Separate Node.js dependency installation from Playwright installation - Use playwright install-deps for system dependencies - Install chromium browser separately for better error handling - Fix duplicate WORKDIR declaration - These changes should prevent build timeouts and improve success rate 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 00b48f5 commit 6d18764

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --d
2323
WORKDIR /app
2424

2525
# Clone Firecrawl repository
26-
RUN git clone https://github.com/mendableai/firecrawl.git . \
27-
&& cd apps/api && npm install --timeout=300000 \
28-
&& npx playwright install --with-deps chromium
26+
RUN git clone https://github.com/mendableai/firecrawl.git .
27+
28+
# Install Node.js dependencies
29+
WORKDIR /app/apps/api
30+
RUN npm install --timeout=300000
31+
32+
# Install Playwright with browsers (separate step for better caching)
33+
RUN npx playwright install-deps && npx playwright install chromium
2934

3035
# Copy production environment
3136
COPY .env.production /app/apps/api/.env
@@ -56,8 +61,6 @@ ENV NODE_ENV=production \
5661
TIMEOUT_MS=30000 \
5762
TEST_API_KEY=7877e105e5f7b9ec3edf4a8eec5059ab9914efef1b30fe232f59ff31cb8e6fcf
5863

59-
WORKDIR /app/apps/api
60-
6164
EXPOSE 3002
6265

6366
# Health check

0 commit comments

Comments
 (0)