mirror of
https://github.com/Mailu/Mailu.git
synced 2025-04-07 06:59:54 +02:00
Added replicas variables for core containers
- Added back restart: always on compose flavor - Moved Log driver from .env to docker-compose.yml
This commit is contained in:
parent
6a9e5c1921
commit
3c9cae5d06
@ -10,13 +10,17 @@ 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 }}
|
||||
logging:
|
||||
driver: {{ log_driver or 'json-file' }}
|
||||
ports:
|
||||
{% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993) %}
|
||||
{% if bind4 %}
|
||||
@ -31,6 +35,7 @@ services:
|
||||
|
||||
admin:
|
||||
image: mailu/admin:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
{% if not admin_enabled %}
|
||||
ports:
|
||||
@ -44,6 +49,7 @@ services:
|
||||
|
||||
imap:
|
||||
image: mailu/dovecot:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "{{ root }}/mail:/mail"
|
||||
@ -53,6 +59,7 @@ services:
|
||||
|
||||
smtp:
|
||||
image: mailu/postfix:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "{{ root }}/overrides:/overrides"
|
||||
@ -63,6 +70,7 @@ services:
|
||||
{% if antispam_enabled %}
|
||||
antispam:
|
||||
image: mailu/rspamd:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "{{ root }}/filter:/var/lib/rspamd"
|
||||
@ -75,6 +83,7 @@ services:
|
||||
{% if antivirus_enabled %}
|
||||
antivirus:
|
||||
image: mailu/clamav:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "{{ root }}/filter:/data"
|
||||
@ -83,6 +92,7 @@ services:
|
||||
{% if webdav_enabled %}
|
||||
webdav:
|
||||
image: mailu/radicale:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "{{ root }}/dav:/data"
|
||||
@ -91,6 +101,7 @@ services:
|
||||
{% if fetchmail_enabled %}
|
||||
fetchmail:
|
||||
image: mailu/fetchmail:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
{% endif %}
|
||||
|
||||
@ -98,6 +109,7 @@ services:
|
||||
{% if webmail_type != 'none' %}
|
||||
webmail:
|
||||
image: mailu/{{ webmail_type }}:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "{{ root }}/webmail:/data"
|
||||
|
@ -138,7 +138,7 @@ DOMAIN_REGISTRATION=true
|
||||
# json-file (default)
|
||||
# journald (On systemd platforms, useful for Fail2Ban integration)
|
||||
# syslog (Non systemd platforms, Fail2Ban integration. Disables `docker-compose log` for front!)
|
||||
LOG_DRIVER={{ log_driver or 'json-file' }}
|
||||
# LOG_DRIVER={{ log_driver or 'json-file' }}
|
||||
|
||||
# Docker-compose project name, this will prepended to containers names.
|
||||
COMPOSE_PROJECT_NAME={{ compose_project_name or 'mailu' }}
|
||||
|
@ -10,7 +10,6 @@ services:
|
||||
# External dependencies
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: always
|
||||
volumes:
|
||||
- "{{ root }}/redis:/data"
|
||||
|
||||
@ -18,6 +17,8 @@ services:
|
||||
front:
|
||||
image: mailu/nginx:{{ version }}
|
||||
env_file: {{ env }}
|
||||
logging:
|
||||
driver: {{ log_driver or 'json-file' }}
|
||||
ports:
|
||||
{% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993) %}
|
||||
- target: {{ port }}
|
||||
@ -27,7 +28,7 @@ services:
|
||||
volumes:
|
||||
- "{{ root }}/certs:/certs"
|
||||
deploy:
|
||||
replicas: 1
|
||||
replicas: {{ front_replicas }}
|
||||
|
||||
admin:
|
||||
image: mailu/admin:{{ version }}
|
||||
@ -40,7 +41,7 @@ services:
|
||||
- "{{ root }}/data:/data"
|
||||
- "{{ root }}/dkim:/dkim"
|
||||
deploy:
|
||||
replicas: 1
|
||||
replicas: {{ admin_replicas }}
|
||||
|
||||
imap:
|
||||
image: mailu/dovecot:{{ version }}
|
||||
@ -52,7 +53,7 @@ services:
|
||||
- "{{ root }}/mail:/mail"
|
||||
- "{{ root }}/overrides:/overrides"
|
||||
deploy:
|
||||
replicas: 1
|
||||
replicas: {{ imap_replicas }}
|
||||
|
||||
smtp:
|
||||
image: mailu/postfix:{{ version }}
|
||||
@ -62,7 +63,7 @@ services:
|
||||
volumes:
|
||||
- "{{ root }}/overrides:/overrides"
|
||||
deploy:
|
||||
replicas: 1
|
||||
replicas: {{ smtp_replicas }}
|
||||
|
||||
# Optional services
|
||||
{% if antispam_enabled %}
|
||||
|
@ -5,7 +5,8 @@ you expose it to the world.</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Subnet</label>
|
||||
<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]))$">
|
||||
<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]))$"
|
||||
value="10.0.1.0/24">
|
||||
</div>
|
||||
|
||||
<p>You server will be available under a main hostname but may expose multiple public
|
||||
|
28
setup/templates/steps/stack/04_replicas.html
Normal file
28
setup/templates/steps/stack/04_replicas.html
Normal file
@ -0,0 +1,28 @@
|
||||
{% call macros.panel("info", "Step 5 - Number of replicas for containers") %}
|
||||
<p>Select number of replicas for containers</p>
|
||||
|
||||
<div class="form-group">
|
||||
<input class="form-control" type="number" name="front_replicas" min="1" required value="1"
|
||||
style="width: 6%; display: inline;">
|
||||
<label>Front</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input class="form-control" type="number" name="admin_replicas" min="1" required value="1"
|
||||
style="width: 6%; display: inline;">
|
||||
<label>Admin</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input class="form-control" type="number" name="imap_replicas" min="1" required value="1"
|
||||
style="width: 6%; display: inline;">
|
||||
<label>IMAP</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input class="form-control" type="number" name=smtp_replicas min="1" required value="1"
|
||||
style="width: 6%; display: inline;">
|
||||
<label>SMPT</label>
|
||||
</div>
|
||||
|
||||
{% endcall %}
|
Loading…
x
Reference in New Issue
Block a user