This is a simple FastAPI application that returns a random number and displays it on a web page.
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
uvicorn main:app --reload
-
Open your browser and navigate to
http://127.0.0.1:8000.
-
Build the Docker image:
docker build -t simpleapp . -
Push the image to Google Container Registry (GCR):
docker push gcr.io/your-gcp-project-id/simpleapp
-
Deploy to Cloud Run:
gcloud run deploy --image gcr.io/your-gcp-project-id/simpleapp --platform managed