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/amd64
I've added
--platform linux/amd64
because 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/turboship
It'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-central1
turboship-dev
repo-name
image-name
To 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.dev
GCP 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/turboship
A success means something like this back:
1us-central1-docker.pkg.dev/v2/turboship-dev/anotsosecretproject/turboship/blobs/sha256:4f44545e39b2d39866515e7aadec82100f6a7164b24d721f5e5fdbd170868689
https://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