How to deploy Turboship, a Nuxt3 app, on GCP infrastructure
I suggest you expose your app on port 8080 as it's the default GCP Cloud Run uses.
1docker build -t primetimetran/turboship . --platform linux/amd64I've added
--platform linux/amd64because of this bug/post I ran into.
The repo will hold your images.
Tag your local image following GCP docs/conventions.
1docker tag primetimetran/turboship us-central1-docker.pkg.dev/turboship-dev/anotsosecretproject/turboshipIt's important to have the
region-datacenter-docker.pkg/project-id/repo-name/image-name
In other words the tag's mapping is as follows:
us-central1turboship-devrepo-nameimage-nameTo build on your local you'll need to be authenticated(as opposed to building in GCP console).
1gcloud auth configure-docker us-central1-docker.pkg.devGCP needs a copy of the image. Artifact registry holds it while Cloud Run deploys/hosts it.
1docker push us-central1-docker.pkg.dev/turboship-dev/anotsosecretproject/turboshipA success means something like this back:
1us-central1-docker.pkg.dev/v2/turboship-dev/anotsosecretproject/turboship/blobs/sha256:4f44545e39b2d39866515e7aadec82100f6a7164b24d721f5e5fdbd170868689https://dev.to/sakko/deploying-nuxtjs-on-google-cloud-run-1fic
gcloud builds submit --project "project-name" --config=./cloud-build.yaml
gcloud logging read "resource.type="cloud_run_revision" AND resource.labels.service_name="turboship"" --project=turboship-dev --limit=1000