Skip to main content

Storage and GCP

The current stack example assumes GCS-backed storage.

Core storage variables

VariablePurpose
STORAGE_PROVIDERStorage backend selection; example uses gcs
STORAGE_PROJECT_IDGCP project that owns the bucket
STORAGE_BUCKET_NAMEBucket name used for persisted assets
STORAGE_CUSTOM_DOMAINOptional public domain for served assets

Companion GCP variables

  • GOOGLE_APPLICATION_CREDENTIALS
  • GOOGLE_CLOUD_PROJECT
  • GOOGLE_CLOUD_LOCATION

Setup checklist

  1. Create or choose the target GCP project.
  2. Create a Cloud Storage bucket for the stack.
  3. Grant the service account referenced by GOOGLE_APPLICATION_CREDENTIALS access to that bucket.
  4. Set STORAGE_PROVIDER=gcs, STORAGE_PROJECT_ID, and STORAGE_BUCKET_NAME.

STORAGE_CUSTOM_DOMAIN

  • Leave blank during simple local stack work.
  • Set this only when assets should resolve through a stable external domain.