Skip to content

Commit

Permalink
chore: Deployment docs improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
mturoci committed Oct 9, 2023
1 parent f35eb5d commit edc6aea
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions website/docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ Wave scripts are regular Python scripts. Deploy them as you would any Python scr

## Deploying Wave apps

Wave uses 2 separate servers under the hood - `waved` (Go server) and `wave app` (Python server). See [architecture](/docs/architecture/) to learn more.

Wave apps are [ASGI](https://asgi.readthedocs.io/en/latest/)-compatible, based on [Uvicorn](https://www.uvicorn.org) / [Starlette](https://www.starlette.io/), a [high-performance](https://www.techempower.com/benchmarks/#section=data-r17&hw=ph&test=fortune&l=zijzen-1) Python server.

You can run Wave apps behind any ASGI server, like [uvicorn](https://www.uvicorn.org), [gunicorn](https://gunicorn.org/), [daphne](https://github.com/django/daphne/), [hypercorn](https://pgjones.gitlab.io/hypercorn/), etc.

It's highly recommended to run Wave server (waved) [separately](/docs/tutorial-hello/#step-1-start-the-wave-server) from Wave app for production deployment in order to achieve the highest flexibility (custom ASGI server configuration). However, if you don't need that, you are good to go with a simple `wave run --no-reload app`.

To run your app using an ASGI server, append `:main` to the `app` argument. For example, if you were normally executing your app `foo.py` using `wave run foo`, and want to run your app using Uvicorn, use `uvicorn foo:main`.

These commands are equivalent:
Expand All @@ -34,12 +38,6 @@ To configure a different port, see [configuring ports](/docs/configuration/#how-
`uvicorn` accepts `--env-file` flag to specify `.env` configuration file for the Wave app. Note that as of time of writing, `--env-file` does not support configuration of Uvicorn itself. Using this flag may require running `pip install python-dotenv` first.
:::

### Wave server

Wave uses 2 separate servers under the hood - waved (Go server) and wave app (Python server). See [architecture](/docs/architecture/) to learn more.

It's highly recommended to run Wave server (waved) [separately](/docs/tutorial-hello/#step-1-start-the-wave-server) from Wave app for production deployment.

More info about various configuration options can be found in the [configuration section](/docs/configuration).

### Beyond defaults
Expand Down

0 comments on commit edc6aea

Please sign in to comment.