Add Surah/Ayah browse with Gharaati Tafsir Noor crawl.
build-and-deploy / deploy (push) Failing after 11m0s
build-and-deploy / deploy (push) Failing after 11m0s
Replace episode bookmarks with surah/ayah bookmarks and ayah favorites; import ayah text, notes, messages, and official per-ayah audio from gharaati.ir.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# One-shot crawl of Tafsir Noor into tafsirquran-audio PVC.
|
||||
# Scale API to 0 first (RWO PVC), then create ConfigMap + Job:
|
||||
# kubectl -n tafsirquran create configmap tafsirquran-gharaati-scripts \
|
||||
# --from-file=crawl-gharaati.py=scripts/crawl-gharaati.py --dry-run=client -o yaml | kubectl apply -f -
|
||||
# kubectl -n tafsirquran apply -f k8s/gharaati-crawl-job.yaml
|
||||
# kubectl -n tafsirquran logs -f job/tafsirquran-gharaati-crawl
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: tafsirquran-gharaati-crawl
|
||||
namespace: tafsirquran
|
||||
spec:
|
||||
backoffLimit: 2
|
||||
ttlSecondsAfterFinished: 86400
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: crawl
|
||||
image: python:3.12-slim
|
||||
command: ["/bin/bash", "-lc"]
|
||||
args:
|
||||
- |
|
||||
set -euo pipefail
|
||||
apt-get update -qq
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ca-certificates >/dev/null
|
||||
python3 /scripts/crawl-gharaati.py /data/audio --skip-existing-json --delay 0.25
|
||||
volumeMounts:
|
||||
- name: audio
|
||||
mountPath: /data/audio
|
||||
- name: scripts
|
||||
mountPath: /scripts
|
||||
resources:
|
||||
requests:
|
||||
memory: 256Mi
|
||||
cpu: 250m
|
||||
volumes:
|
||||
- name: audio
|
||||
persistentVolumeClaim:
|
||||
claimName: tafsirquran-audio
|
||||
- name: scripts
|
||||
configMap:
|
||||
name: tafsirquran-gharaati-scripts
|
||||
defaultMode: 0755
|
||||
Reference in New Issue
Block a user