Cloud Run is a fully managed container platform that scales automatically. Make sure you have the gcloud CLI installed and a project configured.
Build your Docker image and push it to Artifact Registry:
# Create a Docker repository
gcloud artifacts repositories create gothic-repo \
--repository-format=docker \
--location=us-central1
# Build and push the image
docker build -t us-central1-docker.pkg.dev/ PROJECT_ID /gothic-repo/app .
docker push us-central1-docker.pkg.dev/ PROJECT_ID /gothic-repo/app Deploy to Cloud Run with your environment variables:
gcloud run deploy gothic-app \
--image us-central1-docker.pkg.dev/ PROJECT_ID /gothic-repo/app \
--platform managed \
--region us-central1 \
--port 8080 \
--set-env-vars REDIS_URL= REDIS_HOST :6379 For production Redis, use Google Cloud Memorystore. Connect your Cloud Run service via a VPC connector to reach the Memorystore instance.
Want to deploy on Microsoft Azure instead?