Required changes
Setting up a WebSocket endpoint requires a custom runtime. Configure it incerebrium.toml:
port: The port the app listens on inside the container.entrypoint: The command to start the app. This example uses Uvicorn to run a FastAPI app inmain.py.healthcheck_endpoint: Confirms instance health. Defaults to a TCP ping on the configured port. A non-200 response marks the instance as unhealthy, triggering a restart if it does not recover.readycheck_endpoint: Confirms the instance is ready to receive traffic. Defaults to a TCP ping on the configured port. A non-200 response removes the instance from request routing.
Things to note
- Custom Runtime Required: WebSocket endpoints require a custom runtime to control how the app runs inside the container.
-
WebSocket URL: Requests must use a
wss://URL. The client must support secure WebSocket connections.