Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Labs

Cloud Run Data in GCS and Firestore

In this lab, we'll deploy a basic image gallery app with Cloud Run, and then refactor it so it uses Cloud Storage instead of local file system storage. Then, we'll add the ability to add metadata to images, which we'll store in the Cloud Firestore NoSQL database. You should be familiar with the GCP console and Cloud Shell to perform this hands-on lab. Some experience with Python will be beneficial.

Lab platform
Lab Info
Level
Intermediate
Last updated
Sep 20, 2025
Duration
30m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Deploy the image-gallery App to Cloud Run
    1. Download the image-gallery code from the course GitHub repo.
    2. Build the container image from the 1-local-storage directory.
    3. Deploy the container to Cloud Run.
    4. Upload a picture of a dog (any dog will do).
  2. Challenge

    Refactor the App to Use Cloud Storage
    1. Create a Cloud Storage bucket for image uploads.
    2. Refactor the code to use Cloud Storage instead of local storage. You can refer to the updated code in 2-cloud-storage, or just use the code in that directory instead of updating your own. Don't forget to change the value of BUCKET_NAME.
    3. Rebuild the container and deploy the updated version of the app to Cloud Run, using gcloud run deploy options of --cpu=2 --max-instances=1 --memory=4Gi.
    4. Re-upload your dog picture.
    5. Deploy a new revision to force the instance to be removed and recreated. The image you uploaded should persist.
  3. Challenge

    Deploy the Cloud Firestore Version of the App
    1. Go to the Cloud Firestore section in the GCP console, and enable Firestore in Native Mode. Choose the us-east1 region.
    2. Refactor the code to use Cloud Firestore in addition to Cloud Storage. You can refer to the updated code in 3-firestore, or just use the code in that directory instead of updating your own.
    3. Rebuild the container and deploy the updated version of the app to Cloud Run.
    4. Upload a dog picture with a description. You should see the image uploaded to Cloud Storage and a document created in Cloud Firestore.
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight