mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-10-30 17:47:55 +00:00
Correct the URL users are directed to after using setup without exposing /admin
closes #885
(cherry picked from commit 392637e16a)
# Conflicts:
# setup/flavors/compose/setup.html
# setup/flavors/stack/setup.html
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# Hostname passed to Traefik
|
# Hostname passed to Traefik
|
||||||
ADDRESS=setup.mailu.io
|
ADDRESS=test02.usrpro.io
|
||||||
|
|
||||||
# Current release
|
# Current release
|
||||||
RELEASE=master
|
RELEASE=master
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:8001:80
|
- 0.0.0.0:80:80
|
||||||
|
|||||||
@@ -47,7 +47,11 @@ one of the hostnames
|
|||||||
<a href="http://127.0.0.1:8080/ui">http://127.0.0.1:8080/ui</a> (only directly from the host running docker).
|
<a href="http://127.0.0.1:8080/ui">http://127.0.0.1:8080/ui</a> (only directly from the host running docker).
|
||||||
If you run mailu on a remote server, and wish to access the admin interface via a SSH tunnel, you can create a port-forward from your local machine to your server like
|
If you run mailu on a remote server, and wish to access the admin interface via a SSH tunnel, you can create a port-forward from your local machine to your server like
|
||||||
<pre><code>ssh -L 127.0.0.1:8080:127.0.0.1:8080 <user>@<server>
|
<pre><code>ssh -L 127.0.0.1:8080:127.0.0.1:8080 <user>@<server>
|
||||||
|
<<<<<<< HEAD
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
=======
|
||||||
|
</pre></code>
|
||||||
|
>>>>>>> 392637e1 (Correct the URL users are directed to after using setup without exposing /admin)
|
||||||
And access the above URL from your local machine.
|
And access the above URL from your local machine.
|
||||||
<br />
|
<br />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
65
setup/flavors/stack/setup.html
Normal file
65
setup/flavors/stack/setup.html
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
{% import "macros.html" as macros %}
|
||||||
|
|
||||||
|
{% call macros.panel("info", "Step 1 - Download your configuration files") %}
|
||||||
|
<p>Docker Stack expects a project file, named <code>docker-compose.yml</code>
|
||||||
|
in a project directory. First create your project directory.</p>
|
||||||
|
|
||||||
|
<pre><code>mkdir -p /{{ root }}/{redis,certs,data,dkim,mail,overrides/rspamd,filter,dav,webmail}
|
||||||
|
</pre></code>
|
||||||
|
|
||||||
|
<p>Then download the project file. A side configuration file makes it easier
|
||||||
|
to read and check the configuration variables generated by the wizard.</p>
|
||||||
|
|
||||||
|
<pre><code>cd {{ root }}
|
||||||
|
wget {{ url_for('.file', uid=uid, filepath='docker-compose.yml', _external=True) }}
|
||||||
|
wget {{ url_for('.file', uid=uid, filepath='mailu.env', _external=True) }}
|
||||||
|
</pre></code>
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
|
|
||||||
|
{% call macros.panel("info", "Step 2 - Review the configuration") %}
|
||||||
|
<p>We did not insert any malicious code on purpose in the configurations we
|
||||||
|
distribute, but your download could have been intercepted, or our wizard
|
||||||
|
website could have been compromised, so make sure you check the configuration
|
||||||
|
files before going any further.</p>
|
||||||
|
|
||||||
|
<p>When you are done checking them, check them one last time.</p>
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
|
{% call macros.panel("info", "Step 3 - Deploy docker stack") %}
|
||||||
|
<p>To deploy the docker stack use the following commands. For more information about setting up docker swarm nodes read the
|
||||||
|
<a href="https://docs.docker.com/get-started">docker documentation</a></p>
|
||||||
|
|
||||||
|
<pre><code>cd {{ root }}
|
||||||
|
docker swarm init
|
||||||
|
docker stack deploy -c docker-compose.yml mailu
|
||||||
|
</pre></code>
|
||||||
|
|
||||||
|
In the docker stack deploy command, mailu is the app name. Feel free to change it.<br/>
|
||||||
|
In order to display the running container you can use<br/>
|
||||||
|
<pre><code>docker ps</code></pre>
|
||||||
|
or
|
||||||
|
<pre><code>docker stack ps --no-trunc mailu</code></pre>
|
||||||
|
Command for removing docker stack is
|
||||||
|
<pre><code>docker stack rm mailu</code></pre>
|
||||||
|
|
||||||
|
Before you can use Mailu, you must create the primary administrator user account. This should be {{ postmaster }}@{{ domain }}. Use the following command, changing PASSWORD to your liking:
|
||||||
|
|
||||||
|
<pre><code>docker exec $(docker ps | grep admin | cut -d ' ' -f1) flask mailu admin {{ postmaster }} {{ domain }} PASSWORD
|
||||||
|
</pre></code>
|
||||||
|
|
||||||
|
<p>Login to the admin interface to change the password for a safe one, at
|
||||||
|
{% if admin_enabled %}
|
||||||
|
one of the hostnames
|
||||||
|
<a href="https://{{ hostnames.split(',')[0] }}{{ admin_path }}">{{ hostnames.split(',')[0] }}{{ admin_path }}</a>.
|
||||||
|
{% else %}
|
||||||
|
<a href="http://127.0.0.1:8080/ui">http://127.0.0.1:8080/ui</a> (only directly from the host running docker).
|
||||||
|
If you run mailu on a remote server, and wish to access the admin interface via a SSH tunnel, you can create a port-forward from your local machine to your server like
|
||||||
|
<pre><code>ssh -L 127.0.0.1:8080:127.0.0.1:8080 <user>@<server>
|
||||||
|
</pre></code>
|
||||||
|
And access the above URL from your local machine.
|
||||||
|
<br />
|
||||||
|
{% endif %}
|
||||||
|
Also, choose the "Update password" option in the left menu.
|
||||||
|
</p>
|
||||||
|
{% endcall %}
|
||||||
Reference in New Issue
Block a user