Updated setup page for stack flavor
This commit is contained in:
@@ -10,14 +10,12 @@ services:
|
|||||||
# External dependencies
|
# External dependencies
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
restart: always
|
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ root }}/redis:/data"
|
- "{{ root }}/redis:/data"
|
||||||
|
|
||||||
# Core services
|
# Core services
|
||||||
front:
|
front:
|
||||||
image: mailu/nginx:{{ version }}
|
image: mailu/nginx:{{ version }}
|
||||||
restart: always
|
|
||||||
env_file: {{ env }}
|
env_file: {{ env }}
|
||||||
ports:
|
ports:
|
||||||
{% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993) %}
|
{% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993) %}
|
||||||
@@ -33,7 +31,6 @@ services:
|
|||||||
|
|
||||||
admin:
|
admin:
|
||||||
image: mailu/admin:{{ version }}
|
image: mailu/admin:{{ version }}
|
||||||
restart: always
|
|
||||||
env_file: {{ env }}
|
env_file: {{ env }}
|
||||||
{% if not admin_enabled %}
|
{% if not admin_enabled %}
|
||||||
ports:
|
ports:
|
||||||
@@ -47,7 +44,6 @@ services:
|
|||||||
|
|
||||||
imap:
|
imap:
|
||||||
image: mailu/dovecot:{{ version }}
|
image: mailu/dovecot:{{ version }}
|
||||||
restart: always
|
|
||||||
env_file: {{ env }}
|
env_file: {{ env }}
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ root }}/mail:/mail"
|
- "{{ root }}/mail:/mail"
|
||||||
@@ -57,7 +53,6 @@ services:
|
|||||||
|
|
||||||
smtp:
|
smtp:
|
||||||
image: mailu/postfix:{{ version }}
|
image: mailu/postfix:{{ version }}
|
||||||
restart: always
|
|
||||||
env_file: {{ env }}
|
env_file: {{ env }}
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ root }}/overrides:/overrides"
|
- "{{ root }}/overrides:/overrides"
|
||||||
@@ -68,7 +63,6 @@ services:
|
|||||||
{% if antispam_enabled %}
|
{% if antispam_enabled %}
|
||||||
antispam:
|
antispam:
|
||||||
image: mailu/rspamd:{{ version }}
|
image: mailu/rspamd:{{ version }}
|
||||||
restart: always
|
|
||||||
env_file: {{ env }}
|
env_file: {{ env }}
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ root }}/filter:/var/lib/rspamd"
|
- "{{ root }}/filter:/var/lib/rspamd"
|
||||||
@@ -81,7 +75,6 @@ services:
|
|||||||
{% if antivirus_enabled %}
|
{% if antivirus_enabled %}
|
||||||
antivirus:
|
antivirus:
|
||||||
image: mailu/clamav:{{ version }}
|
image: mailu/clamav:{{ version }}
|
||||||
restart: always
|
|
||||||
env_file: {{ env }}
|
env_file: {{ env }}
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ root }}/filter:/data"
|
- "{{ root }}/filter:/data"
|
||||||
@@ -90,7 +83,6 @@ services:
|
|||||||
{% if webdav_enabled %}
|
{% if webdav_enabled %}
|
||||||
webdav:
|
webdav:
|
||||||
image: mailu/radicale:{{ version }}
|
image: mailu/radicale:{{ version }}
|
||||||
restart: always
|
|
||||||
env_file: {{ env }}
|
env_file: {{ env }}
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ root }}/dav:/data"
|
- "{{ root }}/dav:/data"
|
||||||
@@ -99,7 +91,6 @@ services:
|
|||||||
{% if fetchmail_enabled %}
|
{% if fetchmail_enabled %}
|
||||||
fetchmail:
|
fetchmail:
|
||||||
image: mailu/fetchmail:{{ version }}
|
image: mailu/fetchmail:{{ version }}
|
||||||
restart: always
|
|
||||||
env_file: {{ env }}
|
env_file: {{ env }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@@ -107,7 +98,6 @@ services:
|
|||||||
{% if webmail_type != 'none' %}
|
{% if webmail_type != 'none' %}
|
||||||
webmail:
|
webmail:
|
||||||
image: mailu/{{ webmail_type }}:{{ version }}
|
image: mailu/{{ webmail_type }}:{{ version }}
|
||||||
restart: always
|
|
||||||
env_file: {{ env }}
|
env_file: {{ env }}
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ root }}/webmail:/data"
|
- "{{ root }}/webmail:/data"
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../compose/setup.html
|
|
||||||
60
setup/flavors/stack/setup.html
Normal file
60
setup/flavors/stack/setup.html
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{% 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 }}
|
||||||
|
curl {{ url_for('.file', uid=uid, filepath='docker-compose.yml', _external=True) }} > docker-compose.yml
|
||||||
|
curl {{ url_for('.file', uid=uid, filepath='mailu.env', _external=True) }} > mailu.env
|
||||||
|
</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) python manage.py 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">http://127.0.0.1:8080</a> (only directly from the host running docker).
|
||||||
|
{% endif %}
|
||||||
|
And choose the "Update password" option in the left menu.
|
||||||
|
</p>
|
||||||
|
{% endcall %}
|
||||||
@@ -5,7 +5,7 @@ you expose it to the world.</p>
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Subnet</label>
|
<label>Subnet</label>
|
||||||
<input class="form-control" type="text" name="subnet" required pattern="^\d+$">
|
<input class="form-control" type="text" name="subnet" required pattern="^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))$">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>You server will be available under a main hostname but may expose multiple public
|
<p>You server will be available under a main hostname but may expose multiple public
|
||||||
|
|||||||
Reference in New Issue
Block a user