NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Trace

data/Dockerfiles/nginx/bootstrap.py

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

bootstrap.py on main
Author Date Commit Line Code
FreddleSpl0it over 1 year ago 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
1
import os
Open commit View diff
1 import os
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
2
import subprocess
Open commit View diff
2 import subprocess
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
3
from jinja2 import Environment, FileSystemLoader
Open commit View diff
3 from jinja2 import Environment, FileSystemLoader
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
4
Open commit View diff
4
FreddleSpl0it over 1 year ago 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
5
def includes_conf(env, template_vars):
Open commit View diff
5 def includes_conf(env, template_vars):
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
6
  server_name = "server_name.active"
Open commit View diff
6 server_name = "server_name.active"
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
7
  listen_plain = "listen_plain.active"
Open commit View diff
7 listen_plain = "listen_plain.active"
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
8
  listen_ssl = "listen_ssl.active"
Open commit View diff
8 listen_ssl = "listen_ssl.active"
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
9
Open commit View diff
9
FreddleSpl0it over 1 year ago 0ad327b

[Nginx] Use separate vhosts for additional server names

Full commit hash
0ad327bbe56a8a14d1de2ed88343b571f343d127
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
10
  server_name_config = f"server_name {template_vars['MAILCOW_HOSTNAME']} autodiscover.* autoconfig.* {' '.join(template_vars['ADDITIONAL_SERVER_NAMES'])};"
Open commit View diff
10 server_name_config = f"server_name {template_vars['MAILCOW_HOSTNAME']} autodiscover.* autoconfig.* {' '.join(template_vars['ADDITIONAL_SERVER_NAMES'])};"
FreddleSpl0it over 1 year ago 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
11
  listen_plain_config = f"listen {template_vars['HTTP_PORT']};"
Open commit View diff
11 listen_plain_config = f"listen {template_vars['HTTP_PORT']};"
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
12
  listen_ssl_config = f"listen {template_vars['HTTPS_PORT']};"
Open commit View diff
12 listen_ssl_config = f"listen {template_vars['HTTPS_PORT']};"
FreddleSpl0it 10 months ago 9940c50

[Nginx] do not invert ENABLE_IPV6

Full commit hash
9940c503a2f9410cf802ed4a014699349c738099
Author
FreddleSpl0it <[email protected]>
Date
10 months ago
Selected line
13
  if template_vars['ENABLE_IPV6']:
Open commit View diff
13 if template_vars['ENABLE_IPV6']:
FreddleSpl0it over 1 year ago 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
14
    listen_plain_config += f"\nlisten [::]:{template_vars['HTTP_PORT']};"
Open commit View diff
14 listen_plain_config += f"\nlisten [::]:{template_vars['HTTP_PORT']};"
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
15
    listen_ssl_config += f"\nlisten [::]:{template_vars['HTTPS_PORT']} ssl;"
Open commit View diff
15 listen_ssl_config += f"\nlisten [::]:{template_vars['HTTPS_PORT']} ssl;"
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
16
  listen_ssl_config += "\nhttp2 on;"
Open commit View diff
16 listen_ssl_config += "\nhttp2 on;"
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
17
Open commit View diff
17
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
18
  with open(f"/etc/nginx/conf.d/{server_name}", "w") as f:
Open commit View diff
18 with open(f"/etc/nginx/conf.d/{server_name}", "w") as f:
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
19
    f.write(server_name_config)
Open commit View diff
19 f.write(server_name_config)
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
20
Open commit View diff
20
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
21
  with open(f"/etc/nginx/conf.d/{listen_plain}", "w") as f:
Open commit View diff
21 with open(f"/etc/nginx/conf.d/{listen_plain}", "w") as f:
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
22
    f.write(listen_plain_config)
Open commit View diff
22 f.write(listen_plain_config)
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
23
Open commit View diff
23
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
24
  with open(f"/etc/nginx/conf.d/{listen_ssl}", "w") as f:
Open commit View diff
24 with open(f"/etc/nginx/conf.d/{listen_ssl}", "w") as f:
same change 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
25
    f.write(listen_ssl_config)
Open commit View diff
25 f.write(listen_ssl_config)
FreddleSpl0it over 1 year ago 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
26
Open commit View diff
26
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
27
def sites_default_conf(env, template_vars):
Open commit View diff
27 def sites_default_conf(env, template_vars):
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
28
  config_name = "sites-default.conf"
Open commit View diff
28 config_name = "sites-default.conf"
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
29
  template = env.get_template(f"{config_name}.j2")
Open commit View diff
29 template = env.get_template(f"{config_name}.j2")
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
30
  config = template.render(template_vars)
Open commit View diff
30 config = template.render(template_vars)
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
31
Open commit View diff
31
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
32
  with open(f"/etc/nginx/includes/{config_name}", "w") as f:
Open commit View diff
32 with open(f"/etc/nginx/includes/{config_name}", "w") as f:
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
33
    f.write(config)
Open commit View diff
33 f.write(config)
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
34
Open commit View diff
34
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
35
def nginx_conf(env, template_vars):
Open commit View diff
35 def nginx_conf(env, template_vars):
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
36
  config_name = "nginx.conf"
Open commit View diff
36 config_name = "nginx.conf"
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
37
  template = env.get_template(f"{config_name}.j2")
Open commit View diff
37 template = env.get_template(f"{config_name}.j2")
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
38
  config = template.render(template_vars)
Open commit View diff
38 config = template.render(template_vars)
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
39
Open commit View diff
39
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
40
  with open(f"/etc/nginx/{config_name}", "w") as f:
Open commit View diff
40 with open(f"/etc/nginx/{config_name}", "w") as f:
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
41
    f.write(config)
Open commit View diff
41 f.write(config)
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
42
Open commit View diff
42
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
43
def prepare_template_vars():
Open commit View diff
43 def prepare_template_vars():
FreddleSpl0it over 1 year ago 8853e2c

[Nginx] Use SOGo IPv4 for upstream

Full commit hash
8853e2c44ae87d285069d549e3f318ad4559d9cd
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
44
  ipv4_network = os.getenv("IPV4_NETWORK", "172.22.1")
Open commit View diff
44 ipv4_network = os.getenv("IPV4_NETWORK", "172.22.1")
FreddleSpl0it over 1 year ago 0ad327b

[Nginx] Use separate vhosts for additional server names

Full commit hash
0ad327bbe56a8a14d1de2ed88343b571f343d127
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
45
  additional_server_names = os.getenv("ADDITIONAL_SERVER_NAMES", "")
Open commit View diff
45 additional_server_names = os.getenv("ADDITIONAL_SERVER_NAMES", "")
FreddleSpl0it over 1 year ago a567d5d

[Nginx] Add support for trusted proxies via env var

Full commit hash
a567d5dc3193286684fdf0b7cf287817bdfe6581
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
46
  trusted_proxies = os.getenv("TRUSTED_PROXIES", "")
Open commit View diff
46 trusted_proxies = os.getenv("TRUSTED_PROXIES", "")
FreddleSpl0it over 1 year ago 0ad327b

[Nginx] Use separate vhosts for additional server names

Full commit hash
0ad327bbe56a8a14d1de2ed88343b571f343d127
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
47
Open commit View diff
47
FreddleSpl0it over 1 year ago 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
48
  template_vars = {
Open commit View diff
48 template_vars = {
FreddleSpl0it over 1 year ago 8853e2c

[Nginx] Use SOGo IPv4 for upstream

Full commit hash
8853e2c44ae87d285069d549e3f318ad4559d9cd
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
49
    'IPV4_NETWORK': ipv4_network,
Open commit View diff
49 'IPV4_NETWORK': ipv4_network,
FreddleSpl0it over 1 year ago a567d5d

[Nginx] Add support for trusted proxies via env var

Full commit hash
a567d5dc3193286684fdf0b7cf287817bdfe6581
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
50
    'TRUSTED_PROXIES': [item.strip() for item in trusted_proxies.split(",") if item.strip()],
Open commit View diff
50 'TRUSTED_PROXIES': [item.strip() for item in trusted_proxies.split(",") if item.strip()],
FreddleSpl0it over 1 year ago 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
51
    'SKIP_RSPAMD': os.getenv("SKIP_RSPAMD", "n").lower() in ("y", "yes"),
Open commit View diff
51 'SKIP_RSPAMD': os.getenv("SKIP_RSPAMD", "n").lower() in ("y", "yes"),
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
52
    'SKIP_SOGO': os.getenv("SKIP_SOGO", "n").lower() in ("y", "yes"),
Open commit View diff
52 'SKIP_SOGO': os.getenv("SKIP_SOGO", "n").lower() in ("y", "yes"),
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
53
    'NGINX_USE_PROXY_PROTOCOL': os.getenv("NGINX_USE_PROXY_PROTOCOL", "n").lower() in ("y", "yes"),
Open commit View diff
53 'NGINX_USE_PROXY_PROTOCOL': os.getenv("NGINX_USE_PROXY_PROTOCOL", "n").lower() in ("y", "yes"),
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
54
    'MAILCOW_HOSTNAME': os.getenv("MAILCOW_HOSTNAME", ""),
Open commit View diff
54 'MAILCOW_HOSTNAME': os.getenv("MAILCOW_HOSTNAME", ""),
FreddleSpl0it over 1 year ago 3544a22

[Nginx] fix ADDITIONAL_SERVER_NAMES array

Full commit hash
3544a2246eaa60a1218fac7d55f5feb453ee8dc2
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
55
    'ADDITIONAL_SERVER_NAMES': [item.strip() for item in additional_server_names.split(",") if item.strip()],
Open commit View diff
55 'ADDITIONAL_SERVER_NAMES': [item.strip() for item in additional_server_names.split(",") if item.strip()],
FreddleSpl0it over 1 year ago 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
56
    'HTTP_PORT': os.getenv("HTTP_PORT", "80"),
Open commit View diff
56 'HTTP_PORT': os.getenv("HTTP_PORT", "80"),
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
57
    'HTTPS_PORT': os.getenv("HTTPS_PORT", "443"),
Open commit View diff
57 'HTTPS_PORT': os.getenv("HTTPS_PORT", "443"),
FreddleSpl0it over 1 year ago 8853e2c

[Nginx] Use SOGo IPv4 for upstream

Full commit hash
8853e2c44ae87d285069d549e3f318ad4559d9cd
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
58
    'SOGOHOST': os.getenv("SOGOHOST", ipv4_network + ".248"),
Open commit View diff
58 'SOGOHOST': os.getenv("SOGOHOST", ipv4_network + ".248"),
FreddleSpl0it over 1 year ago 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
59
    'RSPAMDHOST': os.getenv("RSPAMDHOST", "rspamd-mailcow"),
Open commit View diff
59 'RSPAMDHOST': os.getenv("RSPAMDHOST", "rspamd-mailcow"),
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
60
    'PHPFPMHOST': os.getenv("PHPFPMHOST", "php-fpm-mailcow"),
Open commit View diff
60 'PHPFPMHOST': os.getenv("PHPFPMHOST", "php-fpm-mailcow"),
DerLinkman 12 months ago 88bf9b0

core: modules splitting + ipv6 nat rewrite (#6634)

Full commit hash
88bf9b02e112bced1d37c69a885d8dbad4cd657a
Author
DerLinkman <[email protected]>
Date
12 months ago
Selected line
61
    'ENABLE_IPV6': os.getenv("ENABLE_IPV6", "true").lower() != "false",
Open commit View diff
61 'ENABLE_IPV6': os.getenv("ENABLE_IPV6", "true").lower() != "false",
FreddleSpl0it over 1 year ago e645f93

[Nginx] Add env var for HTTP to HTTPS redirection

Full commit hash
e645f931dc04c8b8754927d90275a2e77a03931d
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
62
    'HTTP_REDIRECT': os.getenv("HTTP_REDIRECT", "n").lower() in ("y", "yes"),
Open commit View diff
62 'HTTP_REDIRECT': os.getenv("HTTP_REDIRECT", "n").lower() in ("y", "yes"),
FreddleSpl0it over 1 year ago 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
63
  }
Open commit View diff
63 }
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
64
Open commit View diff
64
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
65
  ssl_dir = '/etc/ssl/mail/'
Open commit View diff
65 ssl_dir = '/etc/ssl/mail/'
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
66
  template_vars['valid_cert_dirs'] = []
Open commit View diff
66 template_vars['valid_cert_dirs'] = []
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
67
  for d in os.listdir(ssl_dir):
Open commit View diff
67 for d in os.listdir(ssl_dir):
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
68
    full_path = os.path.join(ssl_dir, d)
Open commit View diff
68 full_path = os.path.join(ssl_dir, d)
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
69
    if not os.path.isdir(full_path):
Open commit View diff
69 if not os.path.isdir(full_path):
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
70
      continue
Open commit View diff
70 continue
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
71
Open commit View diff
71
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
72
    cert_path = os.path.join(full_path, 'cert.pem')
Open commit View diff
72 cert_path = os.path.join(full_path, 'cert.pem')
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
73
    key_path = os.path.join(full_path, 'key.pem')
Open commit View diff
73 key_path = os.path.join(full_path, 'key.pem')
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
74
    domains_path = os.path.join(full_path, 'domains')
Open commit View diff
74 domains_path = os.path.join(full_path, 'domains')
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
75
Open commit View diff
75
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
76
    if os.path.isfile(cert_path) and os.path.isfile(key_path) and os.path.isfile(domains_path):
Open commit View diff
76 if os.path.isfile(cert_path) and os.path.isfile(key_path) and os.path.isfile(domains_path):
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
77
      with open(domains_path, 'r') as file:
Open commit View diff
77 with open(domains_path, 'r') as file:
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
78
        domains = file.read().strip()
Open commit View diff
78 domains = file.read().strip()
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
79
      domains_list = domains.split()
Open commit View diff
79 domains_list = domains.split()
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
80
      if domains_list and template_vars["MAILCOW_HOSTNAME"] not in domains_list:
Open commit View diff
80 if domains_list and template_vars["MAILCOW_HOSTNAME"] not in domains_list:
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
81
        template_vars['valid_cert_dirs'].append({
Open commit View diff
81 template_vars['valid_cert_dirs'].append({
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
82
          'cert_path': full_path + '/',
Open commit View diff
82 'cert_path': full_path + '/',
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
83
          'domains': domains
Open commit View diff
83 'domains': domains
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
84
        })
Open commit View diff
84 })
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
85
Open commit View diff
85
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
86
  return template_vars
Open commit View diff
86 return template_vars
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
87
Open commit View diff
87
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
88
def main():
Open commit View diff
88 def main():
FreddleSpl0it over 1 year ago 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
89
  env = Environment(loader=FileSystemLoader('./etc/nginx/conf.d/templates'))
Open commit View diff
89 env = Environment(loader=FileSystemLoader('./etc/nginx/conf.d/templates'))
FreddleSpl0it over 1 year ago 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
90
Open commit View diff
90
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
91
  # Render config
Open commit View diff
91 # Render config
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
92
  print("Render config")
Open commit View diff
92 print("Render config")
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
93
  template_vars = prepare_template_vars()
Open commit View diff
93 template_vars = prepare_template_vars()
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
94
  sites_default_conf(env, template_vars)
Open commit View diff
94 sites_default_conf(env, template_vars)
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
95
  nginx_conf(env, template_vars)
Open commit View diff
95 nginx_conf(env, template_vars)
FreddleSpl0it over 1 year ago 7bcd61e

[Nginx] Generate includes for custom configs

Full commit hash
7bcd61ecb553aadc69efa517802ef581d054a261
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
96
  includes_conf(env, template_vars)
Open commit View diff
96 includes_conf(env, template_vars)
FreddleSpl0it over 1 year ago 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
97
Open commit View diff
97
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
98
Open commit View diff
98
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
99
if __name__ == "__main__":
Open commit View diff
99 if __name__ == "__main__":
same change 70ca5fd

[Nginx] Use jinja2 for templating nginx configuration

Full commit hash
70ca5fde9520f78414b66b2db789a0524cb4975f
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
100
  main()
Open commit View diff
100 main()