Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Golang webserver on cloud run hosted with firebase

I have a fairly simple webserver written in golang that I want to deploy using cloud run and host with firebase. I have worked through the guides that pertains to my situation however I am not having success. I have html templates and a json configuration file embedded with the go embed package. I am running into some issues trying to get this setup. I will try again tonight and will update this with the errors I am running into. If anyone can share the steps I need to take to succeed with this I would much appreciate it. Thanks.

Solved Solved
1 3 753
1 ACCEPTED SOLUTION

Solved! I needed to allow unauthenticated access. 

Allowing public (unauthenticated) access 

View solution in original post

3 REPLIES 3

I built and deployed the project on run with gcloud run deploy --source . --env-vars-file=config.yaml 

I then deployed the project to firebase however it's not showing the webpages that should be served, it's giving an error message because I don't have an index.html or 404.html because I'm using go to build the pages from templates. I used the "Serve Dynamic content" guide but it's not working. 

Any help is appreciated. 

This is the error I am running into now with Firebase hosting: 

Error: Forbidden

Your client does not have permission to get URL / from this server.

 

 

Solved! I needed to allow unauthenticated access. 

Allowing public (unauthenticated) access 

Top Solution Authors