Deploy command
Section titled “Deploy command”From the monorepo root:
pnpm deploy:backendOr from backend/:
pnpm fly:deployConfiguration
Section titled “Configuration”backend/fly.toml: app name, region, health checks, VM sizebackend/Dockerfile: Directus base image + extensionsbackend/start-with-migrate.sh: runs migrations on startup
Secrets
Section titled “Secrets”Set via Fly CLI:
fly secrets set KEY=value -a real-ireland-appRequired secrets include database password, R2 S3 credentials (STORAGE_S3_KEY, STORAGE_S3_SECRET), and KEY/SECRET for Directus. Prefer Fly secrets over plain [env] in fly.toml for sensitive values.
fly secrets set STORAGE_S3_KEY="..." STORAGE_S3_SECRET="..." -a real-ireland-appHealth check
Section titled “Health check”Fly probes GET /server/ping on port 8055 (no database query).
R2 cutover (one-time)
Section titled “R2 cutover (one-time)”After switching STORAGE_LOCATIONS from gcs to s3, existing directus_files rows still reference storage = 'gcs' until updated. Without that step, /assets/* returns 500 (Location "gcs" doesn't exist) and the admin UI can hit rate limits (Under pressure).
Deploy runs backend/migrations/001-storage-gcs-to-s3.js automatically. To run manually:
node backend/scripts/migrate-storage-location-to-s3.mjsOr SQL: UPDATE directus_files SET storage = 's3' WHERE storage = 'gcs';