Compare commits
3 Commits
32a2e95817
...
0e054ce455
Author | SHA1 | Date | |
---|---|---|---|
0e054ce455 | |||
28b7427c7e | |||
58d2c7b0ac |
11
common-settings.yml
Normal file
11
common-settings.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
common-settings:
|
||||
environment:
|
||||
TZ: "${TIMEZONE:-Etc/UTC}"
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "10"
|
||||
compress: "true"
|
||||
restart: "${RESTARTPOLICY:-unless-stopped}"
|
45
mailcow/README.md
Normal file
45
mailcow/README.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# Overrides for mailcow-dockerized
|
||||
|
||||
Provides files that are meant to be copied into your location of the [github.com/mailcow/mailcow-dockerized](https://github.com/mailcow/mailcow-dockerized) repo thereby customizing its behavior.
|
||||
|
||||
yq 'del( .services.[].environment.[] | select(. == "TZ=*") ) | del(.. | select( (tag == "!!map" or tag =="!!seq") and length == 0)) | del( .services.[].restart )' /opt/containers/mailcow-dockerized/docker-compose.yml | yq --indent 4 ea '. as $item ireduce ({}; . * $item )' - /opt/containers/mailcow-dockerized/docker-compose.override.yml > /opt/containers/mailcow-dockerized/docker-compose.final.yml
|
||||
|
||||
|
||||
* Env variables
|
||||
```
|
||||
yq 'del( .services.[].environment.[] | select(. == "TZ=*") ) | del(.. | select( (tag == "!!map" or tag =="!!seq") and length == 0))' ...
|
||||
```
|
||||
From all `.services.[].environment.[]` lists remove items that match the expression `TZ=*`. Realistically this removes the `TZ` environment variable declaration and in some cases leaves the `environment` list empty. If the list now truly is empty delete it.
|
||||
|
||||
Given a file:
|
||||
```
|
||||
services:
|
||||
unbound-mailcow:
|
||||
image: mailcow/unbound:1.16
|
||||
environment:
|
||||
- TZ=${TZ}
|
||||
volumes:
|
||||
- ./data/hooks/unbound:/hooks:Z
|
||||
```
|
||||
Step one does:
|
||||
```
|
||||
services:
|
||||
unbound-mailcow:
|
||||
image: mailcow/unbound:1.16
|
||||
---> environment:
|
||||
volumes:
|
||||
- ./data/hooks/unbound:/hooks:Z
|
||||
```
|
||||
We detect that `environment` is now empty and delete it:
|
||||
```
|
||||
services:
|
||||
unbound-mailcow:
|
||||
image: mailcow/unbound:1.16
|
||||
---> volumes:
|
||||
- ./data/hooks/unbound:/hooks:Z
|
||||
```
|
||||
* Restart policy
|
||||
```
|
||||
del( .services.[].restart ) ...
|
||||
```
|
||||
From all services delete restart policy declaration. We're defaulting to `unless-stopped` via the `extends:` directive.
|
@@ -0,0 +1,77 @@
|
||||
services:
|
||||
unbound-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
mysql-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
redis-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
clamd-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
rspamd-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
php-fpm-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
sogo-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
dovecot-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
postfix-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
memcached-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
nginx-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
acme-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
netfilter-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
watchdog-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
dockerapi-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
solr-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
olefy-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
ofelia-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
ipv6nat-mailcow:
|
||||
extends:
|
||||
file: common-settings.yml
|
||||
service: common-settings
|
||||
|
146
mailcow/env/fully.qualified.domain.name.example
vendored
146
mailcow/env/fully.qualified.domain.name.example
vendored
@@ -0,0 +1,146 @@
|
||||
# Feel free to leave defaults. They apply while these vars are commented out
|
||||
# ---
|
||||
# RESTARTPOLICY=unless-stopped
|
||||
# TIMEZONE=Etc/UTC
|
||||
TIMEZONE=<user_defined_value>
|
||||
|
||||
# Unbound, redis, clamd, rspamd, php-fpm, SOGo, dovecot, Postfix, Nginx, acme, netfilter, watchdog, dockerapi
|
||||
IPV4_NETWORK=<user_defined_value>
|
||||
|
||||
# MySQL
|
||||
SQL_PORT=127.0.0.1:3306
|
||||
|
||||
# MySQL, watchdog, dockerapi
|
||||
DBROOT=<user_defined_value>
|
||||
|
||||
# MySQL, php-fpm, SOGo, dovecot, Postfix, acme, watchdog
|
||||
DBNAME=<user_defined_value>
|
||||
DBUSER=<user_defined_value>
|
||||
DBPASS=<user_defined_value>
|
||||
|
||||
# Redis
|
||||
REDIS_PORT=127.0.0.1:6379
|
||||
|
||||
# rspamd, php-fpm, netfilter, watchdog
|
||||
# IPV6_NETWORK=fd4d:6169:6c63:6f77::/64
|
||||
|
||||
# rspamd, php-fpm, SOGo, dovecot, Postfix, acme, netfilter, watchdog
|
||||
# REDIS_SLAVEOF_IP=
|
||||
# REDIS_SLAVEOF_PORT=
|
||||
|
||||
# php-fpm
|
||||
# API_KEY=invalid
|
||||
# API_KEY_READ_ONLY=invalid
|
||||
# API_ALLOW_FROM=invalid
|
||||
# SKIP_SOGO=n
|
||||
# DEV_MODE=n
|
||||
# WEBAUTHN_ONLY_TRUSTED_VENDORS=n
|
||||
|
||||
# php-fpm, clamd, watchdog
|
||||
# SKIP_CLAMD=n
|
||||
|
||||
# php-fpm, dovecot
|
||||
# IMAP_PORT=143
|
||||
# IMAPS_PORT=993
|
||||
# POP_PORT=110
|
||||
# POPS_PORT=995
|
||||
# SIEVE_PORT=4190
|
||||
SKIP_SOLR=n
|
||||
|
||||
# php-fpm, dovecot, acme, watchdog
|
||||
# COMPOSE_PROJECT_NAME=mailcow-dockerized
|
||||
|
||||
# php-fpm, Postfix
|
||||
# SUBMISSION_PORT=587
|
||||
# SMTPS_PORT=465
|
||||
# SMTP_PORT=25
|
||||
|
||||
# php-fpm, SOGo, dovecot
|
||||
# MAILCOW_PASS_SCHEME=BLF-CRYPT
|
||||
# MASTER=y
|
||||
|
||||
# php-fpm, SOGo, dovecot, Nginx
|
||||
# ALLOW_ADMIN_EMAIL_LOGIN=n
|
||||
|
||||
# php-fpm, SOGo, dovecot, Postfix, Nginx, acme, watchdog
|
||||
MAILCOW_HOSTNAME=<user_defined_value>
|
||||
|
||||
# php-fpm, SOGo, dovecot, Postfix, acme, watchdog
|
||||
# LOG_LINES=9999
|
||||
|
||||
# SOGo
|
||||
# SOGO_EXPIRE_SESSION=480
|
||||
|
||||
# SOGo, Nginx, watchdog
|
||||
# SKIP_SOGO=n
|
||||
|
||||
# SOGo, dovecot
|
||||
# ACL_ANYONE=disallow
|
||||
|
||||
# dovecot
|
||||
DOVECOT_MASTER_USER=<user_defined_value>
|
||||
DOVECOT_MASTER_PASS=<user_defined_value>
|
||||
# MAILDIR_GC_TIME=7200
|
||||
MAILDIR_SUB=Maildir
|
||||
DOVEADM_PORT=127.0.0.1:9091
|
||||
|
||||
# Nginx
|
||||
# HTTP_PORT=80
|
||||
# ADDITIONAL_SERVER_NAMES=
|
||||
# HTTPS_BIND=
|
||||
# HTTP_BIND=
|
||||
|
||||
# Nginx, watchdog
|
||||
# HTTPS_PORT=443
|
||||
|
||||
# acme
|
||||
# ACME_CONTACT=
|
||||
# ADDITIONAL_SAN
|
||||
# DIRECTORY_URL=
|
||||
# ENABLE_SSL_SNI=n
|
||||
# SKIP_IP_CHECK=n
|
||||
# SKIP_HTTP_VERIFICATION=n
|
||||
# ONLY_MAILCOW_HOSTNAME=n
|
||||
# LE_STAGING=n
|
||||
|
||||
# acme, watchdog
|
||||
SKIP_LETS_ENCRYPT=y
|
||||
|
||||
# acme, netfilter
|
||||
# SNAT_TO_SOURCE=n
|
||||
# SNAT6_TO_SOURCE=n
|
||||
|
||||
# watchdog
|
||||
# USE_WATCHDOG=n
|
||||
# WATCHDOG_NOTIFY_EMAIL=
|
||||
# WATCHDOG_NOTIFY_BAN=y
|
||||
# WATCHDOG_SUBJECT=Watchdog ALERT
|
||||
# WATCHDOG_EXTERNAL_CHECKS=n
|
||||
# WATCHDOG_MYSQL_REPLICATION_CHECKS=n
|
||||
# WATCHDOG_VERBOSE=n
|
||||
# IP_BY_DOCKER_API=0
|
||||
# CHECK_UNBOUND=1
|
||||
# EXTERNAL_CHECKS_THRESHOLD=1
|
||||
# NGINX_THRESHOLD=5
|
||||
# UNBOUND_THRESHOLD=5
|
||||
# REDIS_THRESHOLD=5
|
||||
# MYSQL_THRESHOLD=5
|
||||
# MYSQL_REPLICATION_THRESHOLD=1
|
||||
# SOGO_THRESHOLD=3
|
||||
# POSTFIX_THRESHOLD=8
|
||||
# CLAMD_THRESHOLD=15
|
||||
# DOVECOT_THRESHOLD=12
|
||||
# DOVECOT_REPL_THRESHOLD=20
|
||||
# PHPFPM_THRESHOLD=5
|
||||
# RATELIMIT_THRESHOLD=1
|
||||
# FAIL2BAN_THRESHOLD=1
|
||||
# ACME_THRESHOLD=1
|
||||
# RSPAMD_THRESHOLD=5
|
||||
# OLEFY_THRESHOLD=5
|
||||
# MAILQ_THRESHOLD=20
|
||||
# MAILQ_CRIT=30
|
||||
|
||||
# solr
|
||||
SOLR_PORT=127.0.0.1:8983
|
||||
# SOLR_HEAP=1024
|
||||
SKIP_SOLR=n
|
||||
|
Reference in New Issue
Block a user