Very first version of the configuration wizard

This commit is contained in:
kaiyou
2018-03-10 14:05:49 +01:00
parent 31b887807a
commit efaa3058c0
11 changed files with 186 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
{% extends "bootstrap/base.html" %}
{% import "macros.html" as macros %}
{% block title %}Mailu configuration{% endblock %}

View File

@@ -0,0 +1,22 @@
{% extends "base.html" %}
{% block content %}
<div class="container">
<h1>Mailu configuration - {{ branch }}</h1>
{% call macros.panel("warning", "Before starting, read the docs!") %}
Mailu is not perfectly documented, but still has a lot of documentation
available at <a href="https://mailu.io">mailu.io</a>. Make sure you read
the appropriate documentation for your setup and have all the requirements
ready when using this wizard.
{% endcall %}
<form method="post" action="{{ url_for(".setup") }}">
{% include "steps/flavor.html" %}
{% include "steps/expose.html" %}
<input class="btn btn-primary" type="submit" value="Setup Mailu">
</form>
</div>
{% endblock %}

View File

@@ -0,0 +1,22 @@
{% macro panel(style, title) %}
<div class="panel panel-{{ style }}">
<div class="panel-heading">
<h3 class="panel-title">{{ title }}</h3>
</div>
<div class="panel-body">
{{ caller() }}
</div>
</div>
{% endmacro %}
{% macro radio(name, value, emph, text) %}
<div class="radio">
<label>
<input type="radio" name="{{ name }}" value="{{ value }}">
{% if emph %}
<strong>{{ emph }}</strong>,
{% endif %}
{{ text }}
</label>
</div>
{% endmacro %}

View File

@@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
<div class="container">
<h1>Mailu configuration - {{ branch }}</h1>
{% call macros.panel("success", "Your configuration was generated") %}
<p>The following steps will guide you towards downloading and using your
configuration files. Keep in mind that you should review every downloaded
file before running anything based on it.</p>
<p>If you encounter issues while setting Mailu up, please review the
documentation first, then check if an issue is open for that specific
problem. If not, you may either use Github to open an issue and detail what
your problem or bug looks like, or join us on Matrix and discuss it
with contributors.</p>
{% endcall %}
{% autoescape false %}
{{ contents }}
{% endautoescape %}
</div>
{% endblock %}

View File

@@ -0,0 +1,25 @@
{% call macros.panel("info", "Step 2 - expose Mailu to the world") %}
<p>A mail server must be exposed to the world to receive emails, send emails,
and let users access their mailboxes. Mailu has some flexibility in the way
you expose it to the world.</p>
<p>Among Mailu services, the <em>front</em> server is the one accepting connections,
be it directly from the outside world, through a reverse proxy or in any
complex configuration that you might want to setup. It needs to listen on some
IP addresses in order to expose its public services. You must at least setup
an IPv4 or an IPv6 address if you wish to access Mailu.</p>
<p><span class="label label-warning">Warning</span> You must use specific addresses, please
avoid generic all-interfaces addresses like <em>0.0.0.0</em> or <em>::</em>.</p>
<div class="form-group">
<label>IPv4 listen address</label>
<input class="form-control" type="text" placeholder="1.2.3.4">
</div>
<div class="form-group">
<label>IPv6 listen address</label>
<input class="form-control" type="text" placeholder="1.2.3.4">
</div>
{% endcall %}

View File

@@ -0,0 +1,16 @@
{% call macros.panel("info", "Step 1 - pick a flavor") %}
<p>Mailu comes in multiple "flavors". It was originally
designed to run on top of Docker Compose but now offers multiple options
including Docker Stack, Rancher, Kubernetes.</p>
<p>Please note that "official" support, that is provided by the most active
developpers, will mostly cover Compose and Stack, while other flavors are
maintained by specific contributors.</p>
<div class="radio">
{{ macros.radio("flavor", "compose", "Compose", "simply using Docker Compose manager") }}
{{ macros.radio("flavor", "stack", "Stack", "using stack deployments in a Swarm cluster") }}
{{ macros.radio("flavor", "rancher", "Rancher", "on top of the Rancher container manager") }}
{{ macros.radio("flavor", "kubernetes", "Kubernetes", "on top of the Kubernetes container manager") }}
</div>
{% endcall %}