Run your Angular app on Google Cloud

Поділитися
Вставка
  • Опубліковано 18 вер 2024

КОМЕНТАРІ • 42

  • @googlecloudtech
    @googlecloudtech  10 місяців тому

    Checkout more episodes of Serverless Expeditions → goo.gle/ServerlessExpeditions​

  • @cindysi63
    @cindysi63 10 місяців тому +3

    Nicely paced and useful tutorial. Thank you.

  • @yudaadi2209
    @yudaadi2209 10 місяців тому +4

    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

    • @TheMomander
      @TheMomander 10 місяців тому

      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.

  • @sidof8065
    @sidof8065 4 місяці тому +1

    it possible to deploy using docker image

    • @TheMomander
      @TheMomander 4 місяці тому +2

      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".

  • @lennih
    @lennih 7 місяців тому +1

    This was super useful. Much better than other tutorials in the same channel on similar topics. Thanks!

    • @TheMomander
      @TheMomander 7 місяців тому

      Thank you for the kind words -- you made my day!

  • @guillaume1864
    @guillaume1864 6 місяців тому +1

    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 :)

    • @TheMomander
      @TheMomander 6 місяців тому

      Thanks for the feedback!

  • @ajayjatav6969
    @ajayjatav6969 3 місяці тому +1

    thanks for Wonderful Video :), but one question here - HOW to push/deploy changes , what is the command for it

    • @MartinOmander
      @MartinOmander 3 місяці тому

      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.

  • @ZyboroTown
    @ZyboroTown Місяць тому +1

    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.

    • @TheMomander
      @TheMomander Місяць тому

      Sorry, I don't know what might be wrong. Maybe you could console.log() the URL that your code is calling?

    • @ZyboroTown
      @ZyboroTown Місяць тому +1

      @@TheMomander sir i fixed it. Enabled cors and published articled in medium

    • @TheMomander
      @TheMomander Місяць тому

      @@ZyboroTown Congratulations on fixing the problem!

  • @ZyboroTown
    @ZyboroTown Місяць тому +1

    I faced error setting up docker file for angular app. Running on nginx server. Do you have any documentation for same thank you.

    • @TheMomander
      @TheMomander Місяць тому +1

      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!

    • @ZyboroTown
      @ZyboroTown Місяць тому +1

      @@TheMomander sir fixed used docker file from gemini bard with ssr enabled . It used node to load server.js from dist it worked finally.

    • @TheMomander
      @TheMomander Місяць тому

      @@ZyboroTown Good to hear you got it working!

  • @dheer211
    @dheer211 10 місяців тому +1

    It would have been nice if the firestore integration and firebase auth was also setup as part of deploying the app on GCP.

    • @TheMomander
      @TheMomander 10 місяців тому +1

      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.

  • @MaxGeiszler
    @MaxGeiszler 2 місяці тому +1

    Now how do you deploy new updates?

    • @TheMomander
      @TheMomander Місяць тому

      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.

  • @banzai316
    @banzai316 10 місяців тому +1

    Thank you. Very useful

  • @ZaeroX
    @ZaeroX 8 місяців тому

    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

    • @TheMomander
      @TheMomander 8 місяців тому

      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
      @gnoyl 5 місяців тому

      same issue: "sh: 1: ng: not found" it tries to do ng serve

    • @TheMomander
      @TheMomander 4 місяці тому

      @@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.

  • @tntg5
    @tntg5 10 місяців тому +1

    When are you going to make angular SSR out of the box ?

    • @TheMomander
      @TheMomander 10 місяців тому

      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
      @BenWilliams7 17 днів тому +1

      ​@@TheMomander Hello, is there a video showing the SSR version setup/configuration?
      Best regards.

    • @TheMomander
      @TheMomander 15 днів тому

      @@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!

  • @royal-thunder
    @royal-thunder 9 місяців тому +1

    That is so great! Thanks

  • @user-dw9kb4wv1o
    @user-dw9kb4wv1o 6 місяців тому

    gcloud : Termine 'gcloud' non riconosciuto come nome di cmdlet,
    manca un pezzo

    • @TheMomander
      @TheMomander 6 місяців тому

      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!

  • @mariacristinaarezzi
    @mariacristinaarezzi 10 місяців тому

    Hello

  • @JohnMcclaned
    @JohnMcclaned 10 місяців тому +3

    hard pass on Angular

    • @TheMomander
      @TheMomander 10 місяців тому

      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.

    • @JohnMcclaned
      @JohnMcclaned 10 місяців тому

      @@TheMomander all in gcp though