Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Google Cloud Run Setup

default discord avatar
jaydanurwinlast year
6

Hey there Google Cloud experts. Does anyone know why I would get the following error while setting up Payload on Google Cloud Run? It is successfully running the trigger and building Payload inside Cloud Build but it's not completing the last step where it should deploy to Cloud Run. I've made sure the port in Cloud Run is 3000 to match the Dockerfile as well but still no luck. Any help would be greatly appreciated!



ERROR: (gcloud.run.services.update) Revision 'payloadcms-00003-ced' is not ready and cannot serve traffic. The user-provided container failed to start and listen on the port defined provided by the PORT=3000 environment variable. Logs for this revision might contain more information.


So I solved this shortly after posting (the irony) but I'll leave it up in case anyone else runs into this. The logging was hard to track down in GCP but the issue was the IP address not being whitelisted on my MongoDB Atlas server. If you whitelist GCP correctly inside Atlas it should resolve the issue and deploy to Cloud Run successfully.

  • default discord avatar
    ej_yanglast year

    Hey, I've currently encountered the same issues, and is directed to this discord channel.



    I'm curious about what IP address did you register on your MongoDB Atlas server?


    My action item after reading your message was going to MongoDB Atlas and allow 0.0.0.0/0.


    I don't know if I misunderstood what you've said, cuz the problem is still there 😦



    I'm following the step provided by

    https://www.omniux.io/blog/deploying-a-payload-cms-instance-with-docker-and-google-cloud-run

    , but it seems that something is missing out from this article Q_Q



    I've done some tries listed below:


    - specify the port number to 8080


    - build docker image for linux/amd64


    - put 0.0.0.0/0 into MongoDB whitelist

  • discord user avatar
    denolfe
    last year

    Maybe

    @191776538205618177

    can chime in here.

  • default discord avatar
    ccfiellast year
  • default discord avatar
    markatomniuxlast year

    The error is actually quite generic. If you want more information as to why your instance isn’t starting, check the log explorer. There are loads of reasons that can potentially cause this error so looking there will be a good place to start

  • default discord avatar
    ej_yanglast year

    To

    @583087429414813706

    : okay thanks for your information 🙂


    I'll try to set the static-outbound-ip for my instance, and put it into the whitelist



    To

    @191776538205618177

    : The error log shows the same error message to me, which could not help me to shoot the problem 😦


    I'll seek my SRE for help to scan if there's anything wrong with my configuration on Google services

  • default discord avatar
    markatomniuxlast year

    What does the error message say?

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.