{"id":15222049,"url":"https://github.com/googlecloudplatform/deploystack-serverless-e2e-photo-sharing-app","last_synced_at":"2025-06-27T00:35:29.352Z","repository":{"id":57106966,"uuid":"525910999","full_name":"GoogleCloudPlatform/deploystack-serverless-e2e-photo-sharing-app","owner":"GoogleCloudPlatform","description":"An scalable serverless end-to-end photo-sharing application made from 11 Google Cloud components","archived":false,"fork":false,"pushed_at":"2024-10-09T03:06:32.000Z","size":9077,"stargazers_count":30,"open_issues_count":11,"forks_count":11,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-12-18T08:40:24.249Z","etag":null,"topics":["gcp","google-cloud","google-cloud-platform"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoogleCloudPlatform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-17T18:29:57.000Z","updated_at":"2024-11-09T13:44:34.000Z","dependencies_parsed_at":"2024-09-28T15:20:11.122Z","dependency_job_id":null,"html_url":"https://github.com/GoogleCloudPlatform/deploystack-serverless-e2e-photo-sharing-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fdeploystack-serverless-e2e-photo-sharing-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fdeploystack-serverless-e2e-photo-sharing-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fdeploystack-serverless-e2e-photo-sharing-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fdeploystack-serverless-e2e-photo-sharing-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleCloudPlatform","download_url":"https://codeload.github.com/GoogleCloudPlatform/deploystack-serverless-e2e-photo-sharing-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237243005,"owners_count":19278060,"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","google-cloud","google-cloud-platform"],"created_at":"2024-09-28T15:10:04.493Z","updated_at":"2025-02-05T04:31:51.942Z","avatar_url":"https://github.com/GoogleCloudPlatform.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Build an serverless end-to-end photo sharing application with Google Cloud\n\nThis deploystack will help you create a scalable end-to-end photo-sharing application with 11 Google Cloud, Terraform, and Django. \n\n## Architecture\n\n![architecture](architecture.png)\n\n**Components created:** \n* Cloud Run - which will run the app as the main server.\n* Cloud SQL - To store relational database such as user info, posts.\n* Cloud Storage - To store non-relational database such as post media. \n* Cloud Load Balancer - To server traffic with multiple regions. \n* Cloud DNS - To map custom domain and handle requests from your local machines everytime you go to the url.  \n* Cloud Build - apply DevOps CI/CD to automatically deploy your app from gcloud.\n* Secret Manager - To improve the security of the app.\n* Cloud VPC - To connect Cloud SQL with Cloud Run via private network. \n* Cloud DNS - to store static cache for faster connections.\n* Translation API - to translate the post caption if it is in another language.\n* Container Registry - to store, manage, and secure your Docker container images.\n\n**What you can do with this app:**\n* Create post with media and caption\n* Search users\n* View newsfeed\n* Follow other users\n* Change profile picture\n* Translate the post caption to English\n\n## Install\nYou can install this application using the `Open in Google Cloud Shell` button \nbelow. \n\n\u003ca href=\"https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/GoogleCloudPlatform/deploystack-serverless-e2e-photo-sharing-app\u0026shellonly=true\u0026cloudshell_image=gcr.io/ds-artifacts-cloudshell/deploystack_custom_image\" target=\"_new\"\u003e\n    \u003cimg alt=\"Open in Cloud Shell\" src=\"https://gstatic.com/cloudssh/images/open-btn.svg\"\u003e\n\u003c/a\u003e\n\nClicking this link will take you right to the DeployStack app, running in your \nCloud Shell environment. It will walk you through setting up your architecture.  \n\n## Cleanup \nTo remove all billing components from the project\n1. Remove componets with terraform apply -auto-approve -var=project=${PROJECT}\n2. Typing `deploystack uninstall`\n\n## How to run \n**1. Create project with billing enabled, and configure gcloud for that project**\n\n   ```\n   export PROJECT_ID=foobar\n   gcloud config set project $PROJECT_ID\n   ```\n\n**2. Configure default credentials (allows Terraform to apply changes):**\n\n   ```\n   gcloud auth application-default login\n   ```\n   \n   To double check, run ```gcloud auth list```\n   To set active account, run gcloud config set account `ACCOUNT`\n\n**3. Enable base services:**\n\n   ```\n   gcloud services enable \\\n     cloudbuild.googleapis.com \\\n     run.googleapis.com \\\n     vpcaccess.googleapis.com\n   ```\n\n**4. Build base image**\n\n   ```\n   gcloud builds submit\n   ```\n\n**5. Run** ```./test```\n\n   Check the output url from Cloud Run\n\n## Local deployment: \n1. Go to Cloud SQL to get your connection name. It should be in the format: ```{PROJECT_ID}:{SQL_INSTANCE_REGION}:{SQL_INSTANCE_NAME}```\n2. In another terminal, run ```./cloud_sql_proxy -instances={CONNECTION_NAME}=tcp:0.0.0.0:8002```\n3. Run ```PRODUCTION_MODE=\"local\" python3 manage.py runserver --insecure 0.0.0.0:8080``` to run the app locally and connect to Cloud SQL.\n\n### Django models migration \n1. Follow steps in **local deployment** \n2. On your app's terminal, run**```PRODUCTION_MODE=\"local\" python3 manage.py migrate```\n3. Build base image to push new changes to Container Registry \n\n   ```\n   gcloud builds submit\n   ```\n\n4. Run ```./test```\n\n   Check the output url from Cloud Run with new changes\n\n\n---\nHave issues or questions, visit [Issues](https://github.com/GoogleCloudPlatform/deploystack-serverless-e2e-photo-sharing-app/issues).\n\nThis is not an official Google product.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fdeploystack-serverless-e2e-photo-sharing-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglecloudplatform%2Fdeploystack-serverless-e2e-photo-sharing-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fdeploystack-serverless-e2e-photo-sharing-app/lists"}