Backend ======= Config ------ The configuration is handled via a ``.env`` file. Its fields are documented in the autogenerated API doc for :class:`.Settings` Just place the `.env` file in the current dir when launching the backend. A minimal config could be .. code-block:: dot ADMIN_USERNAME=yourAdminUserName ADMIN_PASS=yourAdminPassword SQLALCHEMY_DATABASE_URL=/comments.db That's it! .. note:: If you're using the container release version, mount your config file to ``/.env`` inside the container Install ------- Container ********* .. code-block:: bash podman run -d -p 8000:80 -v /PATH/TO/CONF:/.env \ -v /PATH/TO/PERSISTENT_DB/comments.db:/comments.db \ docker.io/nicocool84/own-comments:latest \ --proxy-headers \ --root-path /somewhere # optional (you can replace podman with docker here) PIP *** .. code-block:: bash pip install own-comments uvicorn own_comments.main:app The easiest way to run the backend is to use a `container `_, but a `pypi package `_ is also available if you prefer. git *** Own-comments uses `poetry `_ for dependency resolution. Clone the repo and run: .. code-block:: bash poetry run uvicorn own_comments.main:app --reload nginx config ************ .. code-block:: nginx server { location /somewhere { proxy_pass http://127.0.0.1:8000/; } } OpenAPI schema -------------- For a quick overview of the REST endpoints, you can have a look at the `fastapi generated doc on my website `_. .. literalinclude:: openapi.yml :language: yaml