Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python : add port 9000 trick #92

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion content/doc/reference/reference-environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ If `TAILSCALE_LOGIN_SERVER` is provided, the agent will be configured to reach a
|`WSGI_POST_BUFFERING` | Maximal size (in bytes) for the headers of a request. | 4096 |
|`WSGI_THREADS` | Number of threads per worker. (Defaut: automatically setup with the scaler size) | |
|`WSGI_WORKERS` | Number of workers. (Defaut: automatically setup with the scaler size) | |


When your Python application doesn't use one of the supported backends, with `CC_RUN_COMMAND` for example, it must listen on port `9000`, not `8080`.

## Ruby

[Ruby Documentation](/guides/ruby-rack-app-tutorial)
Expand Down
2 changes: 2 additions & 0 deletions static/partials/language-specific-deploy/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ The module (without .py) must be importable, i.e. be in `PYTHONPATH`. Basically,

For example with *Flask*, it's gonna be the name of your main server file, followed by your Flask object: `server:app` for instance if you have a `server.py` file at the root of your project with a Flask `app` object inside.

You can also use `CC_RUN_COMMAND` to launch Python application your way. In such case, it must listen on port `9000`.

### Choose Python version

The default version of python on Clever Cloud is **2.7**. If you want to use python **3.x** instead, create an [environment variable](#setting-up-environment-variables-on-clever-cloud) `CC_PYTHON_VERSION` equal to either `3` (which will default to the most up-to-date version), `3.7`, `3.8`, `3.9`, `3.10` or `3.11`.
Expand Down
Loading