Skip to content

Instantly share code, notes, and snippets.

@grant
Created June 29, 2020 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grant/572373d9bfb9a6805836edb78b4925d3 to your computer and use it in GitHub Desktop.
Save grant/572373d9bfb9a6805836edb78b4925d3 to your computer and use it in GitHub Desktop.
Vapor Cloud Run
# Set project to current project in gcloud
PROJECT=$(gcloud config list --format 'value(core.project)' 2>/dev/null)
# Build the container using Cloud Build, giving plenty of time for the `swift build` step
gcloud builds submit --tag gcr.io/$PROJECT/vapor --timeout="20m"
# Run the container
gcloud run deploy vapor --image gcr.io/$GCP_PROJECT/vapor --platform managed --allow-unauthenticated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment