mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-12-20 05:11:30 +00:00
Add support for custom_templates folder to override Jinja2 templates
This commit is contained in:
@@ -31,7 +31,10 @@ class Bootstrap(BootstrapBase):
|
|||||||
|
|
||||||
# Setup Jinja2 Environment and load vars
|
# Setup Jinja2 Environment and load vars
|
||||||
self.env = Environment(
|
self.env = Environment(
|
||||||
loader=FileSystemLoader('/etc/clamav/config_templates'),
|
loader=FileSystemLoader([
|
||||||
|
'/etc/clamav/custom_templates',
|
||||||
|
'/etc/clamav/config_templates'
|
||||||
|
]),
|
||||||
keep_trailing_newline=True,
|
keep_trailing_newline=True,
|
||||||
lstrip_blocks=True,
|
lstrip_blocks=True,
|
||||||
trim_blocks=True
|
trim_blocks=True
|
||||||
|
|||||||
@@ -30,7 +30,10 @@ class Bootstrap(BootstrapBase):
|
|||||||
|
|
||||||
# Setup Jinja2 Environment and load vars
|
# Setup Jinja2 Environment and load vars
|
||||||
self.env = Environment(
|
self.env = Environment(
|
||||||
loader=FileSystemLoader('/etc/dovecot/config_templates'),
|
loader=FileSystemLoader([
|
||||||
|
'/etc/dovecot/custom_templates',
|
||||||
|
'/etc/dovecot/config_templates'
|
||||||
|
]),
|
||||||
keep_trailing_newline=True,
|
keep_trailing_newline=True,
|
||||||
lstrip_blocks=True,
|
lstrip_blocks=True,
|
||||||
trim_blocks=True
|
trim_blocks=True
|
||||||
|
|||||||
@@ -30,7 +30,10 @@ class Bootstrap(BootstrapBase):
|
|||||||
|
|
||||||
# Setup Jinja2 Environment and load vars
|
# Setup Jinja2 Environment and load vars
|
||||||
self.env = Environment(
|
self.env = Environment(
|
||||||
loader=FileSystemLoader('/etc/mysql/conf.d/config_templates'),
|
loader=FileSystemLoader([
|
||||||
|
'/etc/mysql/conf.d/custom_templates',
|
||||||
|
'/etc/mysql/conf.d/config_templates'
|
||||||
|
]),
|
||||||
keep_trailing_newline=True,
|
keep_trailing_newline=True,
|
||||||
lstrip_blocks=True,
|
lstrip_blocks=True,
|
||||||
trim_blocks=True
|
trim_blocks=True
|
||||||
|
|||||||
@@ -22,7 +22,10 @@ class Bootstrap(BootstrapBase):
|
|||||||
|
|
||||||
# Setup Jinja2 Environment and load vars
|
# Setup Jinja2 Environment and load vars
|
||||||
self.env = Environment(
|
self.env = Environment(
|
||||||
loader=FileSystemLoader('/etc/nginx/conf.d/config_templates'),
|
loader=FileSystemLoader([
|
||||||
|
'/etc/nginx/conf.d/custom_templates',
|
||||||
|
'/etc/nginx/conf.d/config_templates'
|
||||||
|
]),
|
||||||
keep_trailing_newline=True,
|
keep_trailing_newline=True,
|
||||||
lstrip_blocks=True,
|
lstrip_blocks=True,
|
||||||
trim_blocks=True
|
trim_blocks=True
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ class Bootstrap(BootstrapBase):
|
|||||||
|
|
||||||
# Setup Jinja2 Environment and load vars
|
# Setup Jinja2 Environment and load vars
|
||||||
self.env = Environment(
|
self.env = Environment(
|
||||||
loader=FileSystemLoader('/php-conf/config_templates'),
|
loader=FileSystemLoader([
|
||||||
|
'/php-conf/custom_templates',
|
||||||
|
'/php-conf/config_templates'
|
||||||
|
]),
|
||||||
keep_trailing_newline=True,
|
keep_trailing_newline=True,
|
||||||
lstrip_blocks=True,
|
lstrip_blocks=True,
|
||||||
trim_blocks=True
|
trim_blocks=True
|
||||||
|
|||||||
@@ -17,7 +17,10 @@ class Bootstrap(BootstrapBase):
|
|||||||
|
|
||||||
# Setup Jinja2 Environment and load vars
|
# Setup Jinja2 Environment and load vars
|
||||||
self.env = Environment(
|
self.env = Environment(
|
||||||
loader=FileSystemLoader('/opt/postfix/conf/config_templates'),
|
loader=FileSystemLoader([
|
||||||
|
'/opt/postfix/conf/custom_templates',
|
||||||
|
'/opt/postfix/conf/config_templates'
|
||||||
|
]),
|
||||||
keep_trailing_newline=True,
|
keep_trailing_newline=True,
|
||||||
lstrip_blocks=True,
|
lstrip_blocks=True,
|
||||||
trim_blocks=True
|
trim_blocks=True
|
||||||
|
|||||||
@@ -60,7 +60,10 @@ class Bootstrap(BootstrapBase):
|
|||||||
|
|
||||||
# Setup Jinja2 Environment and load vars
|
# Setup Jinja2 Environment and load vars
|
||||||
self.env = Environment(
|
self.env = Environment(
|
||||||
loader=FileSystemLoader('/etc/rspamd/config_templates'),
|
loader=FileSystemLoader([
|
||||||
|
'/etc/rspamd/custom_templates',
|
||||||
|
'/etc/rspamd/config_templates'
|
||||||
|
]),
|
||||||
keep_trailing_newline=True,
|
keep_trailing_newline=True,
|
||||||
lstrip_blocks=True,
|
lstrip_blocks=True,
|
||||||
trim_blocks=True
|
trim_blocks=True
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ class Bootstrap(BootstrapBase):
|
|||||||
|
|
||||||
# Setup Jinja2 Environment and load vars
|
# Setup Jinja2 Environment and load vars
|
||||||
self.env = Environment(
|
self.env = Environment(
|
||||||
loader=FileSystemLoader("/etc/sogo/config_templates"),
|
loader=FileSystemLoader([
|
||||||
|
'/etc/sogo/custom_templates',
|
||||||
|
'/etc/sogo/config_templates'
|
||||||
|
]),
|
||||||
keep_trailing_newline=True,
|
keep_trailing_newline=True,
|
||||||
lstrip_blocks=True,
|
lstrip_blocks=True,
|
||||||
trim_blocks=True
|
trim_blocks=True
|
||||||
|
|||||||
0
data/conf/clamav/custom_templates/.gitkeep
Normal file
0
data/conf/clamav/custom_templates/.gitkeep
Normal file
0
data/conf/dovecot/custom_templates/.gitkeep
Normal file
0
data/conf/dovecot/custom_templates/.gitkeep
Normal file
0
data/conf/mysql/custom_templates/.gitkeep
Normal file
0
data/conf/mysql/custom_templates/.gitkeep
Normal file
0
data/conf/nginx/custom_templates/.gitkeep
Normal file
0
data/conf/nginx/custom_templates/.gitkeep
Normal file
0
data/conf/phpfpm/custom_templates/.gitkeep
Normal file
0
data/conf/phpfpm/custom_templates/.gitkeep
Normal file
0
data/conf/postfix/custom_templates/.gitkeep
Normal file
0
data/conf/postfix/custom_templates/.gitkeep
Normal file
0
data/conf/rspamd/custom_templates/.gitkeep
Normal file
0
data/conf/rspamd/custom_templates/.gitkeep
Normal file
0
data/conf/sogo/custom_templates/.gitkeep
Normal file
0
data/conf/sogo/custom_templates/.gitkeep
Normal file
Reference in New Issue
Block a user