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)
1. API (which is also used as a worker image)
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
```
2. Playwright
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
```
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:
- name: api
image: ghcr.io/winkk-dev/firecrawl:latest
imagePullPolicy: Always
args: [ "pnpm", "run", "start:production" ]
ports:
- containerPort: 3002
envFrom:
- configMapRef:
name: firecrawl-config
- secretRef:
name: firecrawl-secret
#- secretRef:
# name: firecrawl-secret
---
apiVersion: v1
kind: Service

View File

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

View File

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

View File

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