feat(upload): run scheduled jobs with cron

This commit is contained in:
2026-08-02 18:06:25 +07:00 Unverified
parent c810b0ab35
commit 5b0bc32845
3 changed files with 16 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
FROM nginx:alpine
COPY scripts/video-upload-crontab /etc/crontabs/root
ENTRYPOINT ["crond", "-f", "-l", "2", "-L", "/dev/stdout"]
+10
View File
@@ -20,6 +20,16 @@ services:
network_mode: "service:app" network_mode: "service:app"
restart: unless-stopped restart: unless-stopped
video-upload-scheduler:
build:
context: .
dockerfile: Dockerfile.scheduler
restart: unless-stopped
depends_on:
- app
env_file:
- .env
secret-scan: secret-scan:
image: ghcr.io/gitleaks/gitleaks:v8.30.1 image: ghcr.io/gitleaks/gitleaks:v8.30.1
profiles: profiles:
+1
View File
@@ -0,0 +1 @@
* * * * * wget -q -O /dev/null --header="Authorization: Bearer ${CRON_SECRET}" http://app:3000/api/cron/video-uploads || echo "Scheduled video upload processing failed." >&2