{"id":15493828,"url":"https://github.com/peter554/gcp-cloud-run-contacts","last_synced_at":"2025-06-11T10:06:44.661Z","repository":{"id":100534825,"uuid":"378664970","full_name":"Peter554/gcp-cloud-run-contacts","owner":"Peter554","description":"GCP Cloud Run example with Cloud SQL","archived":false,"fork":false,"pushed_at":"2021-06-20T18:09:58.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T11:28:46.563Z","etag":null,"topics":["gcp","gcp-cloud-run","gcp-cloud-sql","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Peter554.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-06-20T14:27:18.000Z","updated_at":"2021-06-20T18:11:09.000Z","dependencies_parsed_at":"2023-05-15T19:15:20.265Z","dependency_job_id":null,"html_url":"https://github.com/Peter554/gcp-cloud-run-contacts","commit_stats":{"total_commits":2,"total_committers":2,"mean_commits":1.0,"dds":0.5,"last_synced_commit":"d90daf17b8cadc4c5c5afa67a4c324579b118286"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter554%2Fgcp-cloud-run-contacts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter554%2Fgcp-cloud-run-contacts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter554%2Fgcp-cloud-run-contacts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter554%2Fgcp-cloud-run-contacts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Peter554","download_url":"https://codeload.github.com/Peter554/gcp-cloud-run-contacts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246068302,"owners_count":20718503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gcp","gcp-cloud-run","gcp-cloud-sql","golang"],"created_at":"2024-10-02T08:09:34.070Z","updated_at":"2025-03-28T17:13:18.991Z","avatar_url":"https://github.com/Peter554.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gcp-cloud-run-contacts\n\n[![CI](https://github.com/Peter554/gcp-cloud-run-contacts/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Peter554/gcp-cloud-run-contacts/actions/workflows/ci.yml)\n\nAn example app using GCP Cloud Run with Cloud SQL.\n\n## Project ID\n\n- Set the GitHub actions secret `GCP_PROJECT_ID`\n\n## Database preparations\n\nhttps://cloud.google.com/sql/docs/postgres/connect-run\n\n- Create a Cloud SQL postgres instance.\n- Connect to the instance (`gcloud sql connect`) and create the contacts table:\n\n```sql\ncreate table if not exists contacts (\n    id serial primary key,\n    name varchar(100),\n    email varchar(100)\n);\n```\n\n- Obtain the `INSTANCE_CONNECTION_NAME` (`gcloud sql instances describe`).\n- Set the GitHub actions secret `GCP_SQL_CONNECTION_NAME`.\n- Determine the postgres Data Source Name (DSN): `user=postgres password=\u003cpassword\u003e database=postgres host=/cloudsql/\u003cINSTANCE_CONNECTION_NAME\u003e`\n- Set the GitHub actions secret `GCP_SQL_DSN`.\n\n## Service account\n\n- Create  a service account and obtain a JSON key (https://github.com/google-github-actions/deploy-cloudrun/)\n- Set the GitHub actions secret `GCP_CREDENTIALS`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter554%2Fgcp-cloud-run-contacts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter554%2Fgcp-cloud-run-contacts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter554%2Fgcp-cloud-run-contacts/lists"}