{"id":17259952,"url":"https://github.com/gordalina/fly-cloud-sql-proxy","last_synced_at":"2026-02-18T00:32:35.579Z","repository":{"id":223830462,"uuid":"761662261","full_name":"gordalina/fly-cloud-sql-proxy","owner":"gordalina","description":"Template to deploy CloudSQL Proxy on Fly.io","archived":false,"fork":false,"pushed_at":"2024-05-11T04:33:46.000Z","size":6,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T07:55:58.502Z","etag":null,"topics":["cloudsql","cloudsql-proxy","fly","flyio"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gordalina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-22T08:53:35.000Z","updated_at":"2025-07-01T20:05:04.000Z","dependencies_parsed_at":"2024-02-22T09:47:02.661Z","dependency_job_id":"a353024a-6d54-40cb-81db-efb7b0da35ff","html_url":"https://github.com/gordalina/fly-cloud-sql-proxy","commit_stats":null,"previous_names":["gordalina/fly-cloud-sql-proxy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gordalina/fly-cloud-sql-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordalina%2Ffly-cloud-sql-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordalina%2Ffly-cloud-sql-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordalina%2Ffly-cloud-sql-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordalina%2Ffly-cloud-sql-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gordalina","download_url":"https://codeload.github.com/gordalina/fly-cloud-sql-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordalina%2Ffly-cloud-sql-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29563467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudsql","cloudsql-proxy","fly","flyio"],"created_at":"2024-10-15T07:46:44.375Z","updated_at":"2026-02-18T00:32:35.553Z","avatar_url":"https://github.com/gordalina.png","language":null,"funding_links":[],"categories":["Databases"],"sub_categories":[],"readme":"# Cloud SQL Proxy on Fly.io\n\nThis repository allows you to provision a Cloud SQL Proxy on Fly.io as a private service, enabling secure access to your Google Cloud SQL instances without the need for public IP addresses.\n\n## Prerequisites\n\nBefore you start, ensure you have the following:\n\n- A Google Cloud Platform account with billing enabled.\n- A Cloud SQL instance created on Google Cloud Platform.\n- A service account with the appropriate permissions for accessing your Cloud SQL instance, i.e. `roles/cloudsql.client`\n- A service account key in JSON format\n- The fly CLI installed on your machine. Visit [Fly.io documentation](https://fly.io/docs/hands-on/install-flyctl) for installation instructions.\n\n## Setup\n\nStart by cloning this repository to your local machine and navigate into the directory:\n\n```sh\ngit clone https://github.com/gordalina/fly-cloud-sql-proxy.git fly-cloud-sql-proxy\ncd fly-cloud-sql-proxy\n```\n\nUse the fly CLI to create a new application on Fly.io. This step copies the existing fly.toml configuration but does not deploy the app yet:\n\n```sh\nfly launch --copy-config --no-deploy\n```\n\nEncode your Google Cloud service account key file to base64 and set it as a secret in your Fly.io application:\n\n```sh\nfly secrets set \"GOOGLE_APPLICATION_CREDENTIALS_JSON=$(base64 \u003c service_account_key.json)\"\n```\n\nUpdate the `fly.toml` configuration file to include the connection name of your Cloud SQL instance. You can add multiple instances by incrementing the suffix number (_0, _1, etc.):\n\n```toml\nCSQL_PROXY_INSTANCE_CONNECTION_NAME_0 = 'project:region:instance?port=5432'\n```\n\nFinally, deploy your Cloud SQL Proxy on Fly.io:\n\n```sh\nfly deploy\n```\n\nEnsure your proxy service remains private by releasing any public IPs associated with it:\n\n```sh\nfly ips list\nfly ips release \u003cip_address\u003e\n```\n\n## Connecting to your SQL instance\n\nWith the setup complete, your services within the same Fly.io organization can connect to your Cloud SQL instance. Ensure your application connects without SSL as the proxy provides secure access:\n\n```\npostgres://user:pwd@your-app-name.internal:port/dbname?ssl=false\n```\n\n## Additional configuration\n\nAll command line flags of Cloud SQL Proxy can be injected via environmental variables with the prefix `CSQL_PROXY_`.\nTo get a list of all flags run:\n\n```sh\ndocker run --rm gcr.io/cloud-sql-connectors/cloud-sql-proxy --help\n```\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests to improve the documentation or functionality of this project.\n\n## License\n\nThis project is open source and available under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgordalina%2Ffly-cloud-sql-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgordalina%2Ffly-cloud-sql-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgordalina%2Ffly-cloud-sql-proxy/lists"}