Getting started
Installation
make install
Configuration
The following environment variables must be defined with the database connection settings:
DB_NAME=''
DB_HOST=''
DB_USER=''
DB_PASS=''
DB_PORT=''
You can define them in several ways:
- passing them to
docker runwith the-e VAR=valueargument. - manually using
export - sourcing a script with the
exportcommands - saving them in your
virtualenvpostactivatescript - ...
Running
Development
For development, you can run the project with:
uvicorn yaml2rss.entrypoints.api.main:api --reload
You can then access the API at http://localhost:8000 and the Swagger UI (interactive API documentation) at http://localhost:8000/docs.
Production
For production, a process manager is recommended to handle multiple
workers, such as gunicorn.
For example:
gunicorn \
-b 0.0.0.0:8000 \
-w 4 \
-k uvicorn.workers.UvicornWorker \
yaml2rss.entrypoints.api.main:api
Options:
-boption specifies the binding host and port.-woption specifies the number of workers.-koption specifies the type of workers, that need to beuvicorn.workers.UvicornWorkeras specified at the Uvicorn Documentation.
Last update:
2022-01-23