Skip to Content
DeploymentDeployment

Deployment

Once you’ve completed the Getting Started guide, this section covers everything you need for a production deployment.

Background services

The picpeak-backend container runs a single Node process that hosts the HTTP API plus several long-lived workers. Knowing what each one does helps when reading logs or debugging.

WorkerTriggerWhat it does
Storage backend (initStorage)StartupValidates STORAGE_BACKEND config; HEADs the bucket / stats the directory. Refuses to boot on misconfig.
File watcher (chokidar)Startup; local mode onlyAuto-imports any photo dropped into events/active/<slug>/. Disabled when STORAGE_BACKEND=s3.
S3 auto-importerStartup; opt-in via STORAGE_AUTO_IMPORT=truePolls every active event’s S3 prefix on a slow cadence (default 5 min). Imports objects seen for two consecutive polls. See Storage Backends.
Email queue processorEvery 60sSends queued notifications (event creation, expiration warnings, archive complete).
Expiration checkerEvery hour (cron)Marks galleries inactive past their expires_at, then archives them. Fires event.expired then event.archived webhooks.
Webhook delivery workerEvery 5sPicks up pending webhook_deliveries, signs the body with HMAC-SHA256, POSTs with retries. See Webhooks.
Backup serviceCron (admin-configurable)Local + S3 backups of photos, thumbnails, database.
Temp upload cleanupEvery hourRemoves orphaned multer temp files older than 1 hour.

All workers share the same database connection pool. They’re independent of each other — a stuck email queue won’t block webhook deliveries, etc.

Last updated on