Skip to content

Conversation

@sweatybridge
Copy link
Contributor

@sweatybridge sweatybridge commented Jan 30, 2026

What kind of change does this PR introduce?

feature

What is the new behavior?

Make config.json readable in studio via SUPABASE_CONFIG env var.

Use volume mount in the future to support read write.

Additional context

To generate the jsonschema for this config:

go run ./tools/jsonschema/main.go | jq

Example config

{
  "project_id": "cli",
  "api": {
    "enabled": true,
    "schemas": ["public", "graphql_public"],
    "extra_search_path": ["public", "extensions"],
    "max_rows": 1000,
    "port": 54321,
    "tls": { "enabled": false, "cert_path": "", "key_path": "" },
    "external_url": "http://127.0.0.1:54321"
  },
  "db": {
    "port": 54322,
    "shadow_port": 54320,
    "health_timeout": 120000000000,
    "major_version": 17,
    "root_key": "",
    "pooler": {
      "enabled": false,
      "port": 54329,
      "pool_mode": "transaction",
      "default_pool_size": 20,
      "max_client_conn": 100
    },
    "migrations": { "enabled": true, "schema_paths": [] },
    "seed": { "enabled": true, "sql_paths": ["supabase/seed.sql"] },
    "settings": {
      "effective_cache_size": null,
      "logical_decoding_work_mem": null,
      "maintenance_work_mem": null,
      "max_connections": null,
      "max_locks_per_transaction": null,
      "max_parallel_maintenance_workers": null,
      "max_parallel_workers": null,
      "max_parallel_workers_per_gather": null,
      "max_replication_slots": null,
      "max_slot_wal_keep_size": null,
      "max_standby_archive_delay": null,
      "max_standby_streaming_delay": null,
      "max_wal_size": null,
      "max_wal_senders": null,
      "max_worker_processes": null,
      "session_replication_role": null,
      "shared_buffers": null,
      "statement_timeout": null,
      "track_activity_query_size": null,
      "track_commit_timestamp": null,
      "wal_keep_size": null,
      "wal_sender_timeout": null,
      "work_mem": null
    },
    "network_restrictions": {
      "enabled": false,
      "allowed_cidrs": ["0.0.0.0/0"],
      "allowed_cidrs_v6": ["::/0"]
    },
    "vault": null
  },
  "realtime": {
    "enabled": true,
    "ip_version": "IPv4",
    "max_header_length": 4096
  },
  "studio": {
    "enabled": true,
    "port": 54323,
    "api_url": "http://127.0.0.1:54321",
    "openai_api_key": ""
  },
  "inbucket": {
    "enabled": true,
    "port": 54324,
    "smtp_port": 0,
    "pop3_port": 0,
    "admin_email": "admin@email.com",
    "sender_name": "Admin"
  },
  "storage": {
    "enabled": true,
    "file_size_limit": "50MiB",
    "image_transformation": null,
    "s3_protocol": { "enabled": true },
    "buckets": null,
    "analytics": {
      "enabled": false,
      "max_namespaces": 5,
      "max_tables": 10,
      "max_catalogs": 2,
      "buckets": {}
    },
    "vector": {
      "enabled": false,
      "max_buckets": 10,
      "max_indexes": 5,
      "buckets": {}
    }
  },
  "auth": {
    "enabled": true,
    "site_url": "http://127.0.0.1:3000",
    "additional_redirect_urls": ["https://127.0.0.1:3000"],
    "jwt_expiry": 3600,
    "jwt_issuer": "http://127.0.0.1:54321/auth/v1",
    "enable_refresh_token_rotation": true,
    "refresh_token_reuse_interval": 10,
    "enable_manual_linking": false,
    "enable_signup": true,
    "enable_anonymous_sign_ins": false,
    "minimum_password_length": 6,
    "password_requirements": "",
    "signing_keys_path": "",
    "rate_limit": {
      "anonymous_users": 30,
      "token_refresh": 150,
      "sign_in_sign_ups": 30,
      "token_verifications": 30,
      "email_sent": 2,
      "sms_sent": 30,
      "web3": 30
    },
    "captcha": null,
    "hook": {
      "mfa_verification_attempt": null,
      "password_verification_attempt": null,
      "custom_access_token": null,
      "send_sms": null,
      "send_email": null,
      "before_user_created": null
    },
    "mfa": {
      "totp": { "enroll_enabled": false, "verify_enabled": false },
      "phone": {
        "enroll_enabled": false,
        "verify_enabled": false,
        "otp_length": 6,
        "template": "Your code is {{ .Code }}",
        "max_frequency": 5000000000
      },
      "web_authn": { "enroll_enabled": false, "verify_enabled": false },
      "max_enrolled_factors": 10
    },
    "sessions": { "timebox": 0, "inactivity_timeout": 0 },
    "email": {
      "enable_signup": true,
      "double_confirm_changes": true,
      "enable_confirmations": false,
      "secure_password_change": false,
      "template": {},
      "notification": {},
      "smtp": null,
      "max_frequency": 1000000000,
      "otp_length": 6,
      "otp_expiry": 3600
    },
    "sms": {
      "enable_signup": false,
      "enable_confirmations": false,
      "template": "Your code is {{ .Code }}",
      "twilio": {
        "enabled": false,
        "account_sid": "",
        "message_service_sid": "",
        "auth_token": "hash:9418293d53c8d2d648022198c4eba02ea5e5c45573b8c404c7e5264ee52863ba"
      },
      "twilio_verify": {
        "enabled": false,
        "account_sid": "",
        "message_service_sid": "",
        "auth_token": ""
      },
      "messagebird": { "enabled": false, "originator": "", "access_key": "" },
      "textlocal": { "enabled": false, "sender": "", "api_key": "" },
      "vonage": {
        "enabled": false,
        "from": "",
        "api_key": "",
        "api_secret": ""
      },
      "test_otp": {},
      "max_frequency": 5000000000
    },
    "external": {
      "apple": {
        "enabled": false,
        "client_id": "",
        "secret": "",
        "url": "",
        "redirect_uri": "",
        "skip_nonce_check": false,
        "email_optional": false
      }
    },
    "web3": {
      "solana": { "enabled": false },
      "ethereum": { "enabled": false }
    },
    "oauth_server": {
      "enabled": false,
      "allow_dynamic_registration": false,
      "authorization_url_path": "/oauth/consent"
    },
    "publishable_key": "",
    "secret_key": "",
    "jwt_secret": "",
    "anon_key": "",
    "service_role_key": "",
    "third_party": {
      "firebase": { "enabled": false, "project_id": "" },
      "auth0": { "enabled": false, "tenant": "", "tenant_region": "" },
      "aws_cognito": {
        "enabled": false,
        "user_pool_id": "",
        "user_pool_region": ""
      },
      "clerk": { "enabled": false, "domain": "" },
      "workos": { "enabled": false, "issuer_url": "" }
    }
  },
  "edge_runtime": {
    "enabled": true,
    "policy": "per_worker",
    "inspector_port": 8083,
    "secrets": {},
    "deno_version": 2
  },
  "functions": null,
  "analytics": {
    "enabled": true,
    "port": 54327,
    "backend": "postgres",
    "gcp_project_id": "",
    "gcp_project_number": "",
    "gcp_jwt_path": "",
    "vector_port": 0
  },
  "experimental": {
    "orioledb_version": "",
    "s3_host": "",
    "s3_region": "",
    "s3_access_key": "",
    "s3_secret_key": "",
    "webhooks": null,
    "inspect": { "rules": null }
  },
  "remotes": null
}

@sweatybridge sweatybridge requested a review from a team as a code owner January 30, 2026 19:01
@coveralls
Copy link

coveralls commented Jan 30, 2026

Pull Request Test Coverage Report for Build 21528232149

Details

  • 13 of 15 (86.67%) changed or added relevant lines in 2 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.008%) to 55.476%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/start/start.go 3 5 60.0%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 21522313044: -0.008%
Covered Lines: 7117
Relevant Lines: 12829

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants