diff --git a/setup/flavors/compose/docker-compose.yml b/setup/flavors/compose/docker-compose.yml index c2846e84..b01bb8fd 100644 --- a/setup/flavors/compose/docker-compose.yml +++ b/setup/flavors/compose/docker-compose.yml @@ -10,14 +10,12 @@ services: # External dependencies redis: image: redis:alpine - restart: always volumes: - "{{ root }}/redis:/data" # Core services front: image: mailu/nginx:{{ version }} - restart: always env_file: {{ env }} ports: {% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993) %} @@ -33,7 +31,6 @@ services: admin: image: mailu/admin:{{ version }} - restart: always env_file: {{ env }} {% if not admin_enabled %} ports: @@ -47,7 +44,6 @@ services: imap: image: mailu/dovecot:{{ version }} - restart: always env_file: {{ env }} volumes: - "{{ root }}/mail:/mail" @@ -57,7 +53,6 @@ services: smtp: image: mailu/postfix:{{ version }} - restart: always env_file: {{ env }} volumes: - "{{ root }}/overrides:/overrides" @@ -68,7 +63,6 @@ services: {% if antispam_enabled %} antispam: image: mailu/rspamd:{{ version }} - restart: always env_file: {{ env }} volumes: - "{{ root }}/filter:/var/lib/rspamd" @@ -81,7 +75,6 @@ services: {% if antivirus_enabled %} antivirus: image: mailu/clamav:{{ version }} - restart: always env_file: {{ env }} volumes: - "{{ root }}/filter:/data" @@ -90,7 +83,6 @@ services: {% if webdav_enabled %} webdav: image: mailu/radicale:{{ version }} - restart: always env_file: {{ env }} volumes: - "{{ root }}/dav:/data" @@ -99,7 +91,6 @@ services: {% if fetchmail_enabled %} fetchmail: image: mailu/fetchmail:{{ version }} - restart: always env_file: {{ env }} {% endif %} @@ -107,7 +98,6 @@ services: {% if webmail_type != 'none' %} webmail: image: mailu/{{ webmail_type }}:{{ version }} - restart: always env_file: {{ env }} volumes: - "{{ root }}/webmail:/data" diff --git a/setup/flavors/stack/setup.html b/setup/flavors/stack/setup.html deleted file mode 120000 index ab09944c..00000000 --- a/setup/flavors/stack/setup.html +++ /dev/null @@ -1 +0,0 @@ -../compose/setup.html \ No newline at end of file diff --git a/setup/flavors/stack/setup.html b/setup/flavors/stack/setup.html new file mode 100644 index 00000000..d68a6422 --- /dev/null +++ b/setup/flavors/stack/setup.html @@ -0,0 +1,60 @@ +{% import "macros.html" as macros %} + +{% call macros.panel("info", "Step 1 - Download your configuration files") %} +

Docker Stack expects a project file, named docker-compose.yml +in a project directory. First create your project directory.

+ +
mkdir -p /{{ root }}/{redis,certs,data,dkim,mail,overrides/rspamd,filter,dav,webmail}
+
+ +

Then download the project file. A side configuration file makes it easier +to read and check the configuration variables generated by the wizard.

+ +
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
+
+{% endcall %} + + +{% call macros.panel("info", "Step 2 - Review the configuration") %} +

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.

+ +

When you are done checking them, check them one last time.

+{% endcall %} + +{% call macros.panel("info", "Step 3 - Deploy docker stack") %} +

To deploy the docker stack use the following commands. For more information about setting up docker swarm nodes read the + docker documentation

+ +
cd {{ root }}
+docker swarm init
+docker stack deploy -c docker-compose.yml mailu
+
+ +In the docker stack deploy command, mailu is the app name. Feel free to change it.
+In order to display the running container you can use
+
docker ps
+or +
docker stack ps --no-trunc mailu
+Command for removing docker stack is +
docker stack rm mailu
+ +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: + +
docker exec $(docker ps | grep admin | cut -d ' ' -f1) python manage.py admin {{ postmaster }} {{ domain }} PASSWORD 
+
+ +

Login to the admin interface to change the password for a safe one, at +{% if admin_enabled %} +one of the hostnames +{{ hostnames.split(',')[0] }}{{ admin_path }}. +{% else %} +http://127.0.0.1:8080 (only directly from the host running docker). +{% endif %} +And choose the "Update password" option in the left menu. +

+{% endcall %} diff --git a/setup/templates/steps/stack/03_expose.html b/setup/templates/steps/stack/03_expose.html index 58c538f0..a9cffc1c 100644 --- a/setup/templates/steps/stack/03_expose.html +++ b/setup/templates/steps/stack/03_expose.html @@ -5,7 +5,7 @@ you expose it to the world.

- +

You server will be available under a main hostname but may expose multiple public