Skip to content

Commit

Permalink
Add info on PROCESS_MANAGER env var to README
Browse files Browse the repository at this point in the history
92e6b68

This commit will build on 92e6b68, further updating the README with more
details on how to use the new `PROCESS_MANAGER` environment variable.
  • Loading branch information
br3ndonland committed Aug 30, 2020
1 parent 306d520 commit d2220ba
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,12 @@ Run container with mounted volume and Uvicorn reloading for development:

```sh
cd /path/to/repo
docker run -d -p 80:80 -e "LOG_LEVEL=debug" -e "WITH_RELOAD=true" -v $(pwd)/package:/app imagename
docker run -d -p 80:80 \
-e "LOG_LEVEL=debug" -e "PROCESS_MANAGER=uvicorn" -e "WITH_RELOAD=true" \
-v $(pwd)/package:/app imagename
```

- `WITH_RELOAD=true`: `start.py` will run Uvicorn with reloading and without Gunicorn. The Gunicorn configuration won't apply, but these environment variables will still work as [described](#configuration):
- `PROCESS_MANAGER=uvicorn WITH_RELOAD=true`: `start.py` will run Uvicorn with reloading and without Gunicorn. The Gunicorn configuration won't apply, but these environment variables will still work as [described](#configuration):
- `MODULE_NAME`
- `VARIABLE_NAME`
- `APP_MODULE`
Expand Down Expand Up @@ -378,19 +380,22 @@ docker build . --rm --target starlette -t localhost/br3ndonland/inboard/starlett
# Uvicorn with reloading
cd inboard

docker run -d -p 80:80 -e "LOG_LEVEL=debug" -e "WITH_RELOAD=true" \
docker run -d -p 80:80 \
-e "LOG_LEVEL=debug" -e "PROCESS_MANAGER=uvicorn" -e "WITH_RELOAD=true" \
-v $(pwd)/inboard/gunicorn_conf.py:/gunicorn_conf.py \
-v $(pwd)/inboard/logging_conf.py:/logging_conf.py \
-v $(pwd)/inboard/start.py:/start.py \
-v $(pwd)/inboard/app:/app localhost/br3ndonland/inboard/base

docker run -d -p 80:80 -e "LOG_LEVEL=debug" -e "WITH_RELOAD=true" \
docker run -d -p 80:80 \
-e "LOG_LEVEL=debug" -e "PROCESS_MANAGER=uvicorn" -e "WITH_RELOAD=true" \
-v $(pwd)/inboard/gunicorn_conf.py:/gunicorn_conf.py \
-v $(pwd)/inboard/logging_conf.py:/logging_conf.py \
-v $(pwd)/inboard/start.py:/start.py \
-v $(pwd)/inboard/app:/app localhost/br3ndonland/inboard/fastapi

docker run -d -p 80:80 -e "LOG_LEVEL=debug" -e "WITH_RELOAD=true" \
docker run -d -p 80:80 \
-e "LOG_LEVEL=debug" -e "PROCESS_MANAGER=uvicorn" -e "WITH_RELOAD=true" \
-v $(pwd)/inboard/gunicorn_conf.py:/gunicorn_conf.py \
-v $(pwd)/inboard/logging_conf.py:/logging_conf.py \
-v $(pwd)/inboard/start.py:/start.py \
Expand Down

0 comments on commit d2220ba

Please sign in to comment.