079d1a04da63ebdad456d0912a42f201acbe302c — fabrixxm 8 months ago 064fcca master
Add 'deploy' section to README
1 files changed, 29 insertions(+), 0 deletions(-)

M README.md => README.md +29 -0
@@ 15,6 15,35 @@ Configuration is read from environment variables:
- `LW_COLLECTION_PATH` : path to the collection folder. If not set, an error is raised.
- `LW_PAGE_SIZE` : how many entries show per page in list. Defaults to `20`.

## Deploy

Lesana Web is built on [Flask](https://flask.palletsprojects.com/en/2.0.x/) framework and 
talks with webserver using [WSGI](https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface)

Details on how to setup WSGI depends on your webserver. Usually it needs a `.wsgi` file,
wich is not distribuited with the code, and you need to write it.

If Lesana Web is in your `PYTHONPATH` , the `.wsgi` file is just:

from lesanaweb import app as application

Config environment variables should be set in your WSGI configuration.

Alternatively, python import path and/or environment variables can be set directly in the `.wsgi` file:

import sys, os

os.environ['LW_COLLECTION_PATH'] = "/path/to/lesana/collection"

sys.path.insert(0, '/path/where/lesanaweb/is/located')

from lesanaweb import app as application

## Templates

Lesana Web uses three templates, written using [Jinja2](https://jinja.palletsprojects.com/)