Skip to content

Commit

Permalink
Python : add port 9000 trick
Browse files Browse the repository at this point in the history
  • Loading branch information
davlgd committed Dec 1, 2023
1 parent 022de03 commit b6d5639
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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

0 comments on commit b6d5639

Please sign in to comment.