_Since `wiktextract` and its dependency `wikitextprocessor` are not regularly published as a Python package, it's a challenge to fix them to a specific version. From `requirements.txt`, the latest version will always be installed. Attention: This might mean that after reinstalling, the output schema of `wiktextract` might have slightly changed._
* server settings (`host`, `port` and `debug` (boolean))
* supported wiktionary language
* working directory (this can be useful if the server is launched by another server using absolute paths to handle virtual environment)
### 5. Load templates from dump files
Run the script `src/load_dumps.py` to load the most recent dumpfile (for each [supported language](https://gitlab.liris.cnrs.fr/lex-game/live-query-wiktextract/-/blob/main/src/config.py#L5)) into an sqlite database that will be used by `wiktextract`.
Run the script `src/load_dumps.py` to load the most recent dumpfile (for each [supported wiktionary language](https://gitlab.liris.cnrs.fr/lex-game/live-query-wiktextract/-/blob/main/src/config.py#L5)) into an sqlite database that will be used by `wiktextract`.
```
```bash
python src/load_dumps.py
```
### 5. Start flask app
### 6. Start flask app
```
```bash
flask --app src/app.py run
```
You might want to use to ensure flask runs in your currently active virtual environment.
```
```bash
python -m flask --app src/app.py run
```
You can run directly in your virtual environment using absolute paths (in case another server needs to launch this one in one command), example of such command
```bash
sh -cnohup /var/www/live-query-wiktextract/lq-w-extr/bin/python3 /var/www/live-query-wiktextract/src/app.py
```
## Using Docker
Alternatively the app can also be containerized using Docker. You still have to provide the dump files in `dumps/`.