Can I run a fullstack app inside Cloud Run container
I want to set up a cheap website with this stack react + express + firebase auth + firestore
I think running it on Cloud Run might be the best option and with maybe a few thousand requests per month and like 20 MAU it could live in the free tier.
Is this a good assumption and can it be done? I see alot of yt and articles on setting up nginx and react in Cloud run but nothing about setting up an nginx react and express server.
12 comments · 75% upvoted · other discussions
You can technically run both nginx and Node on a single container, but it goes against the best practice of 1 process per container.
Check out Firebase Hosting for the frontend.
NetFutility [OP] 1 points · Apr 2023
I need to whitelist ips allowed to access this app can I do that from Cloud Run or firebase hosting?
BehindTheMath 3 points · Apr 2023
I'm not sure if Firebase Hosting supports whitelisting. I don't believe Cloud Run does.
A better solution might be to use a load balancer with Cloud Storage for the frontend. I believe you can filter by IP using Cloud Armor.
NetFutility [OP] 1 points · Apr 2023
Thank you thats exactly the architecture rec I was looking for. I know it's against practice to have nginx and express processes in same server but I figure in terms of cost savings as well as if I have separate container for express the total cold start time might be doubled