From 17216b8b9c3a993558f6bd04a7a9af4b52493df5 Mon Sep 17 00:00:00 2001 From: xZero707 Date: Fri, 28 May 2021 00:28:32 +0200 Subject: [PATCH] Add more configuration ENV vars --- docker-compose.yml | 7 +++++++ src/templates/postal.example.yml.j2 | 14 +++++++------- src/templates/postal.yml.j2 | 14 +++++++------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index cd0514c..3bc84d2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,6 +54,13 @@ services: - POSTAL_LNAME=Cat - POSTAL_PASSWORD=hDzqLsP5hEXuBinpQ3KHSknvgTxRu6 - POSTAL_EMAIL=aleksandar@puharic.com + - POSTAL_SMTP_HOSTNAME=mailer.network7.nu + - POSTAL_SPF=spf.mailer.network7.nu + - POSTAL_RP=rp.mailer.network7.nu + - POSTAL_MX=mx.network7.nu + - POSTAL_UI_ADDRESS=mailer.network7.nu + - POSTAL_ROUTER_DOMAIN=router.mailer.network7.nu + - POSTAL_TRACK_DOMAIN=trx.network7.nu networks: default: { aliases: [ postal, service ] } client: { aliases: [ postal, mailer, mailer-service ] } diff --git a/src/templates/postal.example.yml.j2 b/src/templates/postal.example.yml.j2 index 45c1b37..32cd01e 100644 --- a/src/templates/postal.example.yml.j2 +++ b/src/templates/postal.example.yml.j2 @@ -5,7 +5,7 @@ web_server: web: # The host that the management interface will be available on - host: postal.example.com + host: {{ POSTAL_UI_ADDRESS }} # The protocol that requests to the management interface should happen on protocol: https @@ -46,12 +46,12 @@ dns: # https://github.com/atech/postal/wiki/Domains-&-DNS-Configuration for further # information about these. mx_records: - - mx.postal.example.com - smtp_server_hostname: postal.example.com - spf_include: spf.postal.example.com - return_path: rp.postal.example.com - route_domain: routes.postal.example.com - track_domain: track.postal.example.com + - {{ POSTAL_MX }} + smtp_server_hostname: {{ POSTAL_SMTP_HOSTNAME }} + spf_include: {{ POSTAL_SPF }} + return_path: {{ POSTAL_RP }} + route_domain: {{ POSTAL_ROUTER_DOMAIN }} + track_domain: {{ POSTAL_TRACK_DOMAIN }} smtp: # Specify an SMTP server that can be used to send messages from the Postal management diff --git a/src/templates/postal.yml.j2 b/src/templates/postal.yml.j2 index 9daae0c..8c8bd65 100644 --- a/src/templates/postal.yml.j2 +++ b/src/templates/postal.yml.j2 @@ -1,6 +1,6 @@ web: # The host that the management interface will be available on - host: postal.example.com + host: {{ POSTAL_UI_ADDRESS }} # The protocol that requests to the management interface should happen on protocol: https @@ -41,12 +41,12 @@ dns: # https://github.com/atech/postal/wiki/Domains-&-DNS-Configuration for further # information about these. mx_records: - - mx.postal.example.com - smtp_server_hostname: postal.example.com - spf_include: spf.postal.example.com - return_path: rp.postal.example.com - route_domain: routes.postal.example.com - track_domain: track.postal.example.com + - {{ POSTAL_MX }} + smtp_server_hostname: {{ POSTAL_SMTP_HOSTNAME }} + spf_include: {{ POSTAL_SPF }} + return_path: {{ POSTAL_RP }} + route_domain: {{ POSTAL_ROUTER_DOMAIN }} + track_domain: {{ POSTAL_TRACK_DOMAIN }} smtp: # Specify an SMTP server that can be used to send messages from the Postal management