Introduction
Deploying a vue application on cloud run is as straight forward as deploying a node application on cloud run. Deploying a...
For further actions, you may consider blocking this person and/or reporting abuse
Doing the build as part of the start command likely hurts the startup time of your app.
You should do it as a line of your Dockerfile.
Yeah it does, but building the app at build time will mean the static assets will not have access to the environment variables passed at run time. One way to optimise the application startup time is optimising the code base such that build time is as fast as possible.
Hi, I'm gettings this error:
"Cloud Run error: Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable. "
I just changed the port to 80 instead of 8080 in nginx.conf
You could have instead added
in your Dockerfile and you are golden...
How add caching for this deployed cloud run url using firebase hosting rewrites firbase.json
for firebase hosting hosted static files+ Cloud run with API we can use caching like this
"rewrites": [
{
"source": "/api/",
"run": {
"serviceId": "myservice-api",
"region": "europe-west1"
}
},
{
"source": "",
"destination": "/index.html"
}
]
and
[
{ "source":"/user/**", "headers": [{"key": "Cache-Control", "value": "no-cache, no-store"}] }
]
what is if whole dynamic Vue with node runtime hosted in the cloud run and firabase.json
have
"rewrites": [ {
"source": "/helloworld",
"run": {
"serviceId": "helloworld", // "service name" (from when you deployed the container image)
"region": "us-central1" // optional (if omitted, default is us-central1)
}
} ]
how to do caching when we are using dynamic webapp with web firebase SDK ? and liked to firebase hosting ?
Is there any reason to deploy it on an actual server rather than deploying it as a static website other than using environment variables?
No reason at all depending on your needs. If you're deploying on an actual server, you will need to take a different approach. Serverless helps take some work off your hands when deploying applications. But if your use-case demands an actual server, then you go for it.