GoogleCloudPlatform / GoogleCloudPlatform/cloud-code-intellij
PyCharm - Cloud Run Locally not working with gunicorn
- Dominant language
- No language data
- Stars
- 325
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
When using PyCharm to debug, `requirements.txt` has unknown dependency on `debugpy` - and `requests` is not used either.
Likewise, `Procfile` starts VS Studio debugger - not used with IntelliJ
On the latter, instead of `Procfile`, why not stay consistent with https://cloud.google.com/run/docs/tips/python#optimize_gunicorn and use a WSGI in Dockerfile CMD since the goal is to deploy to CR eventually.
Problem: debugging does not work with gunicorn with `Failed to start Cloud Run dev session`
For debugging locally, one needs to switch from
`CMD gunicorn --preload --bind :8080 --workers 2 --threads 8 --timeout 0 app:app`
to
`ENTRYPOINT ["python", "app.py"]`
Not ideal for change control.
- IDE type (e.g. IntelliJ, Pycharm): PyCharm
- IDE version: 2023.3.2 Pro
- Cloud Code version (Settings > Plugins > Cloud Code): 23.11.3
- Cloud SDK (Settings > Cloud Code > Cloud SDK)
- Are you allowing the plugin to manage the Cloud SDK: yes
- Version of the Cloud SDK: 458.0.1
- Skaffold version (If you are using Kubernetes features; Settings > Cloud Code > Kubernetes): 2.7.1
- Operating System: win11
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.