
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
github.com/shukui/rest-api-with-go-and-google-cloud-run
Activate Cloud Shell Click Activate Cloud Shell Activate Cloud Shell icon at the top of the Google Cloud console
gcloud auth list
gcloud config list project
Name API Cloud Build cloudbuild.googleapis.com Cloud Run run.googleapis.com
gcloud config set project $(gcloud projects list --format='value(PROJECT_ID)' --filter='qwiklabs-gcp')
git clone https://github.com/rosera/pet-theory.git && cd pet-theory/lab08
FROM gcr.io/distroless/base-debian10 WORKDIR /usr/src/app COPY server . CMD [ "/usr/src/app/server" ]
go build -o server
ls -la
This command builds a container with your code and puts it in the Container Registry of your project.
gcloud builds submit
--tag gcr.io/$GOOGLE_CLOUD_PROJECT/rest-api:0.1
You can see the container if you click: Navigation menu > Container Registry
Once the container has been built, deploy it:
gcloud run deploy rest-api
--image gcr.io/$GOOGLE_CLOUD_PROJECT/rest-api:0.1
--platform managed
--region us-central1
--allow-unauthenticated
--max-instances=2
Navigation Menu > Firestore, Click the Select Native Mode button, Wait for the database to be created. Migrate the import files into a Cloud Storage bucket that has been created for you:
gsutil cp -r gs://spls/gsp645/2019-10-06T20:10:37_43617 gs://$GOOGLE_CLOUD_PROJECT-customer
import this data into Firebase: gcloud beta firestore import gs://$GOOGLE_CLOUD_PROJECT-customer/2019-10-06T20:10:37_43617/
go build -o server
gcloud builds submit
--tag gcr.io/$GOOGLE_CLOUD_PROJECT/rest-api:0.2
gcloud run deploy rest-api
--image gcr.io/$GOOGLE_CLOUD_PROJECT/rest-api:0.2
--platform managed
--region us-central1
--allow-unauthenticated
--max-instances=2
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.