woah, that's interesting, I thought we have to create the images by ourself with Dockerfile or in yaml format, but on this video Google will create the images by themself, I have to try out those things
Yes, it is. In this video I didn't use the "--image" option with "gcloud run deploy". That means that Google built my container for me. If you prefer to supply your own container, use the "--image" option. You can build your container locally or with Google Cloud Build, using "gcloud builds submit".
If there is no SSR it's absolutely fine to serve it as static files through a CDN.. Look like there's a bit of overengineering here, I would expect this tutorial to be acout hosting a very simple angular app (w/o API which is another topic) on the cloud. Also using 100% of the space for VS Code without big borders would be a good idea. Thanks for the explanation on Google Cloud Run, looks very promising for some of my otherl needs :)
You would run "npm run build" to build the files on your local machine. Then you would run "gcloud run deploy [service-name]" to deploy your built files to Cloud Run.
I have an api being called i.e anouther cloud run service in my local i use proxy cpnfig json tp rpute to that server it works fine but angular app in cloud run not redirecting to that proxy cpnfig .json endpoint.
If you prefer written instructions, search for Larry Nguyen's blog post titled "How to Deploy Angular Application on Google Cloud Run". That post provides a step by step guide. Best of luck with your project!
Agreed, but it's easy to add. In my code I usually import Firestore (with one line of code) and then easily read and write to Firestore (with one more line of code). Firebase Auth is a little more work because you need to decide what the login should look like in the context of your web page. I usually use FirebaseUI, so I don't have to build the login form myself.
You would run "npm run build" and then "gcloud run deploy" again. Or you can set up Google Cloud Build or GitHub Actions to trigger a build and deployment when you commit new code to your repo.
i have a issue ... Revision 'pirate-service-00001-biz' is not ready and cannot serve traffic. The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable. Logs for this revision might contain more information
You may have left something out. Go to the Cloud Console, click the hamburger menu in the top left corner, pick Cloud Logging and Log Explorer. All the logs for your project will be there, including the error that caused your application not to start.
@@gnoyl Sorry, I have not seen this error. It's hard to guess what might have gone wrong. All I can suggest is to redo the steps I did in the video, as they worked for me.
I should create a separate video about that. Thank you for the suggestion! In the meantime, there are some good resources online for it, including one from Fireship.
@@BenWilliams7 My coworker Minko published a UA-cam video titled "Modern Angular deployment with Google Cloud". It mentions SSR in the description. Best of luck on your project!
Checkout more episodes of Serverless Expeditions → goo.gle/ServerlessExpeditions
Nicely paced and useful tutorial. Thank you.
woah, that's interesting, I thought we have to create the images by ourself with Dockerfile or in yaml format, but on this video Google will create the images by themself, I have to try out those things
Agreed, source code deployments to Cloud Run are quite useful. A container is still created, but Google figures it out so we don't have to.
it possible to deploy using docker image
Yes, it is. In this video I didn't use the "--image" option with "gcloud run deploy". That means that Google built my container for me. If you prefer to supply your own container, use the "--image" option. You can build your container locally or with Google Cloud Build, using "gcloud builds submit".
This was super useful. Much better than other tutorials in the same channel on similar topics. Thanks!
Thank you for the kind words -- you made my day!
If there is no SSR it's absolutely fine to serve it as static files through a CDN.. Look like there's a bit of overengineering here, I would expect this tutorial to be acout hosting a very simple angular app (w/o API which is another topic) on the cloud.
Also using 100% of the space for VS Code without big borders would be a good idea.
Thanks for the explanation on Google Cloud Run, looks very promising for some of my otherl needs :)
Thanks for the feedback!
thanks for Wonderful Video :), but one question here - HOW to push/deploy changes , what is the command for it
You would run "npm run build" to build the files on your local machine. Then you would run "gcloud run deploy [service-name]" to deploy your built files to Cloud Run.
I have an api being called i.e anouther cloud run service in my local i use proxy cpnfig json tp rpute to that server it works fine but angular app in cloud run not redirecting to that proxy cpnfig .json endpoint.
Sorry, I don't know what might be wrong. Maybe you could console.log() the URL that your code is calling?
@@TheMomander sir i fixed it. Enabled cors and published articled in medium
@@ZyboroTown Congratulations on fixing the problem!
I faced error setting up docker file for angular app. Running on nginx server. Do you have any documentation for same thank you.
If you prefer written instructions, search for Larry Nguyen's blog post titled "How to Deploy Angular Application on Google Cloud Run". That post provides a step by step guide. Best of luck with your project!
@@TheMomander sir fixed used docker file from gemini bard with ssr enabled . It used node to load server.js from dist it worked finally.
@@ZyboroTown Good to hear you got it working!
It would have been nice if the firestore integration and firebase auth was also setup as part of deploying the app on GCP.
Agreed, but it's easy to add. In my code I usually import Firestore (with one line of code) and then easily read and write to Firestore (with one more line of code). Firebase Auth is a little more work because you need to decide what the login should look like in the context of your web page. I usually use FirebaseUI, so I don't have to build the login form myself.
Now how do you deploy new updates?
You would run "npm run build" and then "gcloud run deploy" again. Or you can set up Google Cloud Build or GitHub Actions to trigger a build and deployment when you commit new code to your repo.
Thank you. Very useful
i have a issue ... Revision 'pirate-service-00001-biz' is not ready and cannot serve traffic. The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable. Logs for this revision might contain more information
You may have left something out. Go to the Cloud Console, click the hamburger menu in the top left corner, pick Cloud Logging and Log Explorer. All the logs for your project will be there, including the error that caused your application not to start.
same issue: "sh: 1: ng: not found" it tries to do ng serve
@@gnoyl Sorry, I have not seen this error. It's hard to guess what might have gone wrong. All I can suggest is to redo the steps I did in the video, as they worked for me.
When are you going to make angular SSR out of the box ?
I should create a separate video about that. Thank you for the suggestion! In the meantime, there are some good resources online for it, including one from Fireship.
@@TheMomander Hello, is there a video showing the SSR version setup/configuration?
Best regards.
@@BenWilliams7 My coworker Minko published a UA-cam video titled "Modern Angular deployment with Google Cloud". It mentions SSR in the description. Best of luck on your project!
That is so great! Thanks
gcloud : Termine 'gcloud' non riconosciuto come nome di cmdlet,
manca un pezzo
Make sure you install the gcloud tool first. You can do a web search for "install gcloud" and you will find the instructions. Best of luck!
Hello
hard pass on Angular
You might like the video from last week on how to do the same with React instead. And next week we're releasing the video about Vue.js.
@@TheMomander all in gcp though