feat(upload): run scheduled jobs with cron
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
COPY scripts/video-upload-crontab /etc/crontabs/root
|
||||||
|
|
||||||
|
ENTRYPOINT ["crond", "-f", "-l", "2", "-L", "/dev/stdout"]
|
||||||
@@ -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:
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user