Rename the config dir to setup

This commit is contained in:
kaiyou
2018-04-22 16:10:25 +02:00
parent 40720fb3ea
commit f5538698d3
17 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,124 @@
{% set env='mailu.env' %}
# This file is auto-generated by the Mailu configuration wizard.
# Please read the documentation before attempting any change.
version: '2'
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 }}
env:
- TLS_FLAVOR={{ tls_flavor or 'letsencrypt' }}
- ADMIN={{ expose_admin or 'no' }}
ports:
{% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993) %}
{% if bind4 %}
- "$PUBLIC_IPV4:{{ port }}:{{ port }}"
{% endif %}
{% if bind6 %}
- "$PUBLIC_IPV6:{{ port }}:{{ port }}"
{% endif %}
{% endfor %}
{% if flavor in ('cert', 'mail') %}
volumes:
- "$ROOT/certs:/certs"
{% endif %}
admin:
image: mailu/admin:{{ version }}
restart: always
env_file: {{ env }}
{% if not expose_admin %}
ports:
- 127.0.0.1:8080:80
{% endif %}
volumes:
- "$ROOT/data:/data"
- "$ROOT/dkim:/dkim"
depends_on:
- redis
imap:
image: mailu/dovecot:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "$ROOT/data:/data"
- "$ROOT/mail:/mail"
- "$ROOT/overrides:/overrides"
depends_on:
- front
smtp:
image: mailu/postfix:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "$ROOT/data:/data"
- "$ROOT/overrides:/overrides"
depends_on:
- front
# Optional services
{% if enable_antispam %}
antispam:
image: mailu/rspamd:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "$ROOT/filter:/var/lib/rspamd"
- "$ROOT/dkim:/dkim"
- "$ROOT/overrides/rspamd:/etc/rspamd/override.d"
depends_on:
- front
{% endif %}
{% if enable_antivirus %}
antivirus:
image: mailu/clamav:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "$ROOT/filter:/data"
{% endif %}
{% if enable_webdav %}
webdav:
image: mailu/radivale:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "$ROOT/dav:/data"
{% endif %}
{% if enable_fetchmail %}
fetchmail:
image: mailu/fetchmail:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "$ROOT/data:/data"
{% endif %}
# Webmail
{% if enable_webmail %}
webmail:
image: mailu/{{ webmail }}:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "$ROOT/webmail:/data"
depends_on:
- imap
{% endif %}

View File

@@ -0,0 +1,108 @@
# Mailu main configuration file
#
# This file is autogenerated by the configuration management wizard.
# For a detailed list of configuration variables, see the documentation at
# https://mailu.io
###################################
# Common configuration variables
###################################
# Set this to the path where Mailu data and configuration is stored
ROOT=/mailu
# Set to a randomly generated 16 bytes string
SECRET_KEY={{ secret(16) }}
# Address where listening ports should bind
{% if bind4 %}PUBLIC_IPV4={{ bind4 }}{% endif %}
{% if bind6 %}PUBLIC_IPV6={{ bind6 }}{% endif %}
# Mail address of the postmaster
POSTMASTER={{ postmaster }}
# Hostnames for this server, separated with comas
HOSTNAMES={{ hostnames }}
# Authentication rate limit (per source IP address)
AUTH_RATELIMIT={{ auth_ratelimit }}
# Opt-out of statistics, replace with "True" to opt out
DISABLE_STATISTICS={{ disable_statistics }}
###################################
# Server behavior
###################################
# Message size limit in bytes
# Default: accept messages up to 50MB
MESSAGE_SIZE_LIMIT={{ message_size_limit }}
# Networks granted relay permissions, make sure that you include your Docker
# internal network (default to 172.17.0.0/16)
RELAYNETS={{ relaynets }}
# Will relay all outgoing mails if configured
RELAYHOST={{ relayhost }}
# Fetchmail delay
FETCHMAIL_DELAY={{ fetchmail_delay }}
# Recipient delimiter, character used to delimiter localpart from custom address part
RECIPIENT_DELIMITER={{ recipient_delimiter }}
{% if dmarc_rua or dmarc_ruf %}
# DMARC rua and ruf email
{% if dmarc_rua %}DMARC_RUA={{ dmarc_rua }}{% endif %}
{% if dmarc_ruf %}DMARC_RUF={{ dmarc_ruf }}{% endif %}
{% endif %}
{% if welcome_enabled %}
# Welcome email, enable and set a topic and body if you wish to send welcome
# emails to all users.
WELCOME={{ welcome_enable }}
WELCOME_SUBJECT={{ welcome_subject }}
WELCOME_BODY={{ welcome_body }}
{% endif %}
{% if domain_registration %}
# Domain registration (remove to disable)
DOMAIN_REGISTRATION=true
{% endif %}
###################################
# Web settings
###################################
# Path to the admin interface if enabled
WEB_ADMIN=/admin
# Path to the webmail if enabled
WEB_WEBMAIL=/webmail
# Website name
SITENAME=Mailu
# Linked Website URL
WEBSITE=https://mailu.io
{% if recaptcha_public_key and recaptcha_private_key %}
# Registration reCaptcha settings (warning, this has some privacy impact)
# RECAPTCHA_PUBLIC_KEY={{ recaptcha_public_key }}
# RECAPTCHA_PRIVATE_KEY={{ recaptcha_private_key }}
{% endif %}
###################################
# Advanced settings
###################################
{% if password_scheme %}
# Specific password storage scheme
PASSWORD_SCHEME={{ password_scheme }}
{% endif %}
# Header to take the real ip from
REAL_IP_HEADER={{ real_ip_header }}
# IPs for nginx set_real_ip_from (CIDR list separated by commas)
REAL_IP_FROM={{ real_ip_from }}

View File

@@ -0,0 +1,36 @@
{% import "macros.html" as macros %}
{% call macros.panel("info", "Step 1 - Download your configuration files") %}
<p>Docker Compose expects a project file, named <code>docker-compose.yml</code>
in a project directory. First create your project directory.</p>
<pre><code>mkdir /mailu
</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 /mailu
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 - Start the Compose project") %}
<p>To start your compose project, simply run the Docker Compose <code>up</code>
command.</p>
<pre><code>cd /mailu
docker-compose up -d
</pre></code>
{% endcall %}