Update Kubernetes configs for playwright-service, api, and worker

Added new ConfigMap for playwright-service and adjusted existing references.
Applied imagePullPolicy: Always to ensure all images are updated promptly.
Updated README to include --no-cache for Docker build instructions.
This commit is contained in:
Jakob Stadlhuber 2024-07-24 17:55:45 +02:00
parent 4ead89f983
commit 497aa5d25e
5 changed files with 19 additions and 11 deletions

View File

@ -4,12 +4,12 @@
2. Build Docker images, and host it in your Docker Registry (replace the target registry with your own) 2. Build Docker images, and host it in your Docker Registry (replace the target registry with your own)
1. API (which is also used as a worker image) 1. API (which is also used as a worker image)
1. ```bash 1. ```bash
docker build -t ghcr.io/winkk-dev/firecrawl:latest ../../apps/api docker build --no-cache -t ghcr.io/winkk-dev/firecrawl:latest ../../apps/api
docker push ghcr.io/winkk-dev/firecrawl:latest docker push ghcr.io/winkk-dev/firecrawl:latest
``` ```
2. Playwright 2. Playwright
1. ```bash 1. ```bash
docker build -t ghcr.io/winkk-dev/firecrawl-playwright:latest ../../apps/playwright-service docker build --no-cache -t ghcr.io/winkk-dev/firecrawl-playwright:latest ../../apps/playwright-service
docker push ghcr.io/winkk-dev/firecrawl-playwright:latest docker push ghcr.io/winkk-dev/firecrawl-playwright:latest
``` ```
3. Replace the image in [worker.yaml](worker.yaml), [api.yaml](api.yaml) and [playwright-service.yaml](playwright-service.yaml) 3. Replace the image in [worker.yaml](worker.yaml), [api.yaml](api.yaml) and [playwright-service.yaml](playwright-service.yaml)

View File

@ -17,14 +17,15 @@ spec:
containers: containers:
- name: api - name: api
image: ghcr.io/winkk-dev/firecrawl:latest image: ghcr.io/winkk-dev/firecrawl:latest
imagePullPolicy: Always
args: [ "pnpm", "run", "start:production" ] args: [ "pnpm", "run", "start:production" ]
ports: ports:
- containerPort: 3002 - containerPort: 3002
envFrom: envFrom:
- configMapRef: - configMapRef:
name: firecrawl-config name: firecrawl-config
- secretRef: #- secretRef:
name: firecrawl-secret # name: firecrawl-secret
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service

View File

@ -7,8 +7,6 @@ data:
PORT: "3002" PORT: "3002"
HOST: "0.0.0.0" HOST: "0.0.0.0"
REDIS_URL: "redis://redis:6379" REDIS_URL: "redis://redis:6379"
PLAYWRIGHT_MICROSERVICE_URL: "http://playwright-service:3000" PLAYWRIGHT_MICROSERVICE_URL: "http://playwright-service:3000/html"
USE_DB_AUTHENTICATION: "false" USE_DB_AUTHENTICATION: "false"
SUPABASE_ANON_TOKEN: "" HDX_NODE_BETA_MODE: "1"
SUPABASE_URL: ""
SUPABASE_SERVICE_TOKEN: ""

View File

@ -1,3 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: playwright-service-config
data:
PORT: "3000"
---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@ -17,11 +24,12 @@ spec:
containers: containers:
- name: playwright-service - name: playwright-service
image: ghcr.io/winkk-dev/firecrawl-playwright:latest image: ghcr.io/winkk-dev/firecrawl-playwright:latest
imagePullPolicy: Always
ports: ports:
- containerPort: 3000 - containerPort: 3000
envFrom: envFrom:
- configMapRef: - configMapRef:
name: firecrawl-config name: playwright-service-config
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service

View File

@ -17,8 +17,9 @@ spec:
containers: containers:
- name: worker - name: worker
image: ghcr.io/winkk-dev/firecrawl:latest image: ghcr.io/winkk-dev/firecrawl:latest
imagePullPolicy: Always
envFrom: envFrom:
- configMapRef: - configMapRef:
name: firecrawl-config name: firecrawl-config
- secretRef: #- secretRef:
name: firecrawl-secret # name: firecrawl-secret