Skip to content

Instantly share code, notes, and snippets.

@dkapitan
Created July 3, 2024 19:13
Show Gist options
  • Save dkapitan/5b9c8406e2ef4d6342f3946db04b14fe to your computer and use it in GitHub Desktop.
Save dkapitan/5b9c8406e2ef4d6342f3946db04b14fe to your computer and use it in GitHub Desktop.
Deploy Shiny for Python on Google App Engine
runtime: python
env: flex
instance_class: F2
runtime_config:
operating_system: "ubuntu22"
runtime_version: "3.12"
# name of app
service: some-name
# Use a special gunicorn worker class to support websockets.
# note number of workers needs to match instance_class
# https://cloud.google.com/appengine/docs/flexible/using-websockets-and-session-affinity?tab=python
entrypoint: gunicorn -w 4 -b :$PORT -k uvicorn.workers.UvicornWorker main:app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment