Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
chore(playwright-service): run chromium as non-root (#4171)
tomsideguidedeea077f111d
diff --git a/apps/playwright-service-ts/Dockerfile b/apps/playwright-service-ts/Dockerfileindex 7f72c38b0..371ed70a1 100644--- a/apps/playwright-service-ts/Dockerfile+++ b/apps/playwright-service-ts/Dockerfile@@ -19,9 +19,14 @@ RUN pnpm exec playwright install chromium --with-depsRUN pnpm run build+RUN chown -R node:node /usr/src/app \+ && chmod -R a+rX /usr/local/share/playwright+ARG PORTENV PORT=${PORT}EXPOSE ${PORT}+USER node+CMD [ "pnpm", "start" ]diff --git a/docker-compose.yaml b/docker-compose.yamlindex 67b7fec64..e2ade0104 100644--- a/docker-compose.yaml+++ b/docker-compose.yaml@@ -76,6 +76,10 @@ services:MAX_CONCURRENT_PAGES: ${CRAWL_CONCURRENT_REQUESTS:-10}networks:- backend+ security_opt:+ - no-new-privileges:true+ cap_drop:+ - ALL# Resource limits for Docker Compose (not Swarm)cpus: 2.0mem_limit: 4Gdiff --git a/examples/kubernetes/cluster-install/playwright-service.yaml b/examples/kubernetes/cluster-install/playwright-service.yamlindex 5298a4584..554951cbe 100644--- a/examples/kubernetes/cluster-install/playwright-service.yaml+++ b/examples/kubernetes/cluster-install/playwright-service.yaml@@ -22,10 +22,21 @@ spec:spec:imagePullSecrets:- name: docker-registry-secret+ securityContext:+ runAsNonRoot: true+ runAsUser: 1000+ runAsGroup: 1000+ seccompProfile:+ type: RuntimeDefaultcontainers:- name: playwright-serviceimage: ghcr.io/firecrawl/playwright-service:latestimagePullPolicy: Always+ securityContext:+ allowPrivilegeEscalation: false+ capabilities:+ drop:+ - ALLports:- containerPort: 3000envFrom: