2024-06-05 02:52:08 +08:00
# Install Firecrawl on a Kubernetes Cluster (Simple Version)
# Before installing
1. Set [secret.yaml ](secret.yaml ) and [configmap.yaml ](configmap.yaml ) and do not check in secrets
2024-09-07 16:00:32 +08:00
- **Note**: If `REDIS_PASSWORD` is configured in the secret, please modify the ConfigMap to reflect the following format for `REDIS_URL` and `REDIS_RATE_LIMIT_URL` :
```yaml
REDIS_URL: "redis://:password@host:port"
REDIS_RATE_LIMIT_URL: "redis://:password@host:port"
```
Replace `password` , `host` , and `port` with the appropriate values.
2024-06-05 02:52:08 +08:00
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
2024-07-25 01:06:19 +08:00
docker build --no-cache -t ghcr.io/winkk-dev/firecrawl:latest ../../../apps/api
2024-06-05 03:09:43 +08:00
docker push ghcr.io/winkk-dev/firecrawl:latest
2024-06-05 02:52:08 +08:00
```
2. Playwright
1. ```bash
2024-07-25 01:06:19 +08:00
docker build --no-cache -t ghcr.io/winkk-dev/firecrawl-playwright:latest ../../../apps/playwright-service
2024-06-05 03:09:43 +08:00
docker push ghcr.io/winkk-dev/firecrawl-playwright:latest
2024-06-05 02:52:08 +08:00
```
3. Replace the image in [worker.yaml ](worker.yaml ), [api.yaml ](api.yaml ) and [playwright-service.yaml ](playwright-service.yaml )
## Install
```bash
kubectl apply -f configmap.yaml
kubectl apply -f secret.yaml
kubectl apply -f playwright-service.yaml
kubectl apply -f api.yaml
kubectl apply -f worker.yaml
kubectl apply -f redis.yaml
```
# Port Forwarding for Testing
```bash
kubectl port-forward svc/api 3002:3002 -n dev
```
2024-06-05 02:59:04 +08:00
# Delete Firecrawl
2024-06-05 02:52:08 +08:00
```bash
kubectl delete -f configmap.yaml
kubectl delete -f secret.yaml
kubectl delete -f playwright-service.yaml
kubectl delete -f api.yaml
kubectl delete -f worker.yaml
kubectl delete -f redis.yaml
2024-09-09 10:55:31 +08:00
```