535b95bca7
1538: Introduce environment variable to control dovecot full-text-search r=mergify[bot] a=tremlin ## What type of PR? Enhancement ## What does this PR do? In #1320 a full-text-search feature was enabled in Dovecot by default. Since this can have a big impact on performance, I think it's preferable to offer an option to disable the feature if it is not needed. This PR doesn't change the default behavior (FTS on). ### Related issue(s) - #1320 ## Prerequistes Before we can consider review and merge, please make sure the following list is done and checked. If an entry in not applicable, you can check it or remove it from the list. - [ ] In case of feature or enhancement: documentation updated accordinagly - [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/guide.html#changelog) entry file. Co-authored-by: Thomas Rehn <thomas.rehn@initos.com> |
4 years ago | |
---|---|---|
.. | ||
flavors | 4 years ago | |
static | 6 years ago | |
templates | 5 years ago | |
.env | 6 years ago | |
Dockerfile | 5 years ago | |
README.md | 6 years ago | |
docker-compose.yml | 6 years ago | |
main.py | 7 years ago | |
requirements.txt | 6 years ago | |
server.py | 5 years ago |
README.md
Adding more flavors/steps
(Everything will go under setup/ directory - using Kubernetes flavor as example)
Until this point, the app is working as it follows:
- when accesing the setup page it will display the flavors selection step (
templates/steps/flavor.html
) - after you choose your desired flavor it will iterare over the files in the flavor directory and building the page
(
templates/steps/config.html is general for all flavors
) - when you complete all required fields and press "Setup Mailu" button it will redirect you to the setup page (
flavors/choosen-flavor/setup.html
)
To add a new flavor you need to create a directory under templates/steps/
in which you are adding actual steps.
Eg: Adding a WIP step we'll create templates/steps/kubernetes/wip.html
Note that wizard.html is iterating over files in this directory and building the page. Files are prefixed with a number for sorting purposes.
wip.html will start with
{% call macros.panel("info", "Step X - Work in progress") %}
and end with
{% endcall %}
You store variable from front-page using the name attribute inside tag.
In the example below the string entered in the input field is stored in the variable named var_test
<input type="text" name="var_test">
In order to user the variable furter you use it like {{ var_test }}
In the setup page (flavors/kubernetes/setup.html
) you cand add steps by importing macros
{% import "macros.html" as macros %}
and start and end every step with
{% call macros.panel("info", "Step X - Title") %}
-------------------
{% endcall %}
Generating a file
Create the file template in flavors/kubernetes/
(eg. file.txt) in which you save your variables
ROOT = {{ root }}
MY_VAR = {{ var_test }}
When you submit to Setup Mailu the file will be generated. In order to get the file add the following command to setup.html
<p>curl {{ url_for('.file', uid=uid, filepath='file.txt', _external=True) }} > file.txt</p>