1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-12-19 21:01:31 +00:00

Set Jinja2 template folder to absolute path

This commit is contained in:
FreddleSpl0it
2025-05-22 13:24:35 +02:00
parent f329549c2e
commit c38a4c203e
8 changed files with 16 additions and 13 deletions

View File

@@ -31,7 +31,7 @@ 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/config_templates'),
keep_trailing_newline=True, keep_trailing_newline=True,
lstrip_blocks=True, lstrip_blocks=True,
trim_blocks=True trim_blocks=True

View File

@@ -30,7 +30,7 @@ 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/config_templates'),
keep_trailing_newline=True, keep_trailing_newline=True,
lstrip_blocks=True, lstrip_blocks=True,
trim_blocks=True trim_blocks=True

View File

@@ -30,7 +30,7 @@ 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/config_templates'),
keep_trailing_newline=True, keep_trailing_newline=True,
lstrip_blocks=True, lstrip_blocks=True,
trim_blocks=True trim_blocks=True

View File

@@ -22,7 +22,7 @@ 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/config_templates'),
keep_trailing_newline=True, keep_trailing_newline=True,
lstrip_blocks=True, lstrip_blocks=True,
trim_blocks=True trim_blocks=True

View File

@@ -17,7 +17,7 @@ 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/config_templates'),
keep_trailing_newline=True, keep_trailing_newline=True,
lstrip_blocks=True, lstrip_blocks=True,
trim_blocks=True trim_blocks=True

View File

@@ -60,7 +60,7 @@ 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/config_templates'),
keep_trailing_newline=True, keep_trailing_newline=True,
lstrip_blocks=True, lstrip_blocks=True,
trim_blocks=True trim_blocks=True

View File

@@ -27,7 +27,7 @@ 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/config_templates"),
keep_trailing_newline=True, keep_trailing_newline=True,
lstrip_blocks=True, lstrip_blocks=True,
trim_blocks=True trim_blocks=True

View File

@@ -4,16 +4,18 @@ LABEL maintainer "The Infrastructure Company GmbH <info@servercow.de>"
ENV PIP_BREAK_SYSTEM_PACKAGES=1 ENV PIP_BREAK_SYSTEM_PACKAGES=1
RUN apk add --no-cache nginx \ RUN apk add --no-cache nginx \
python3 \ python3 py3-pip \
supervisor \ supervisor
py3-pip && \
pip install --upgrade pip && \ RUN pip install --break-system-packages \
pip install Jinja2 \
mysql-connector-python \ mysql-connector-python \
redis jinja2 \
redis \
dnspython
RUN mkdir -p /etc/nginx/includes RUN mkdir -p /etc/nginx/includes
COPY data/Dockerfiles/bootstrap /bootstrap COPY data/Dockerfiles/bootstrap /bootstrap
COPY data/Dockerfiles/nginx/docker-entrypoint.sh / COPY data/Dockerfiles/nginx/docker-entrypoint.sh /
COPY data/Dockerfiles/nginx/supervisord.conf /etc/supervisor/supervisord.conf COPY data/Dockerfiles/nginx/supervisord.conf /etc/supervisor/supervisord.conf
@@ -22,4 +24,5 @@ COPY data/Dockerfiles/nginx/stop-supervisor.sh /usr/local/sbin/stop-supervisor.s
RUN chmod +x /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh
RUN chmod +x /usr/local/sbin/stop-supervisor.sh RUN chmod +x /usr/local/sbin/stop-supervisor.sh
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]