You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mailu/setup
bors[bot] c5966b29db
Merge #2035
2035: updated roundcube to 1.5.1 and carddav to 4.3.0 r=mergify[bot] a=ghostwheel42

## What type of PR?

enhancement

## What does this PR do?

updated roundcube to 1.5 and carddav to 4.2.2
also runs cleanup cronjob _once_ at startup

### Related issue(s)

- closes #2031 
- runs cleanup job mentioned in #1702 at startup

## Prerequisites
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.

- [X] In case of feature or enhancement: documentation updated accordingly
- [X] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Alexander Graf <ghostwheel42@users.noreply.github.com>
3 years ago
..
flavors Merge #2035 3 years ago
static Process code review comments (PR #2069). 3 years ago
templates Remove Mailu PostgreSQL. Make roundcube database configurable via setup. Fix #1838. 3 years ago
.env Revert accidental setup commits and fix code/pre tags 6 years ago
Dockerfile Process code review remarks 3 years ago
README.md Remove Mailu PostgreSQL. Make roundcube database configurable via setup. Fix #1838. 3 years ago
docker-compose.yml Revert accidental setup commits and fix code/pre tags 6 years ago
main.py Rename the config dir to setup 6 years ago
requirements.txt Adapt requirements.txt to use pinned versions. 3 years ago
server.py Remove dot in blueprint name to prevent critical flask initialisation error. 3 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 use the variable furter you use it like {{ var_test }}

In the setup page (flavors/kubernetes/setup.html) you can 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>