ops Tutorial
Deploying Expense Tracker to Google Cloud
In this series
- •Deploying Expense Tracker to AWS
- •Deploying Expense Tracker to Google Cloud
- •Deploying Scala & React Apps to Shared Hosting
Google Cloud Platform (GCP) is excellent for containerized applications. We'll use Cloud Run for the backend and Firebase Hosting for the frontend.
Backend (Cloud Run)
-
Containerize: Ensure your
Dockerfileis ready. -
Build and Push: Submit your build to Cloud Build.
gcloud builds submit --tag gcr.io/PROJECT-ID/expense-tracker-api -
Deploy: Deploy the image to Cloud Run.
gcloud run deploy expense-tracker-api --image gcr.io/PROJECT-ID/expense-tracker-api --platform managed -
Database (Cloud SQL): Create a Cloud SQL instance for MySQL. Connect it to Cloud Run using the Cloud SQL Auth Proxy or direct VPC connection.
Frontend (Firebase Hosting)
-
Install CLI:
npm install -g firebase-tools -
Initialize:
firebase init hostingSelect your project and set
distas the public directory. -
Deploy:
npm run build firebase deploy
Conclusion
You now have your application running on Google's scalable infrastructure!
