# Cloudflare Containers configuration for PR preview deployments # This file is used as a template - the GitHub workflow substitutes PR_NUMBER name = "sure-preview-${PR_NUMBER}" main = "./src/index.ts" compatibility_date = "2026-05-11" # Enable workers.dev subdomain for preview access workers_dev = true # Enable container logs [observability] enabled = true # Container configuration - uses preview Dockerfile with embedded PostgreSQL # Note: path is relative to this config file location [[containers]] class_name = "RailsContainer" image = "../../Dockerfile.preview" instance_type = "basic" max_instances = 1 # Durable Object binding for the container [[durable_objects.bindings]] name = "RAILS_CONTAINER" class_name = "RailsContainer" # Required migration for Durable Objects with SQLite [[migrations]] tag = "v1" new_sqlite_classes = ["RailsContainer"] # Environment variables passed to the Rails container [vars] RAILS_ENV = "development" RAILS_LOG_TO_STDOUT = "true" RAILS_SERVE_STATIC_FILES = "true" # Note: SECRET_KEY_BASE and DATABASE_URL are auto-generated by the entrypoint # for development previews. For custom configuration, set via: # wrangler secret put SECRET_KEY_BASE