From a63a8c5f5fa110ea51a3da987daf825fc6ff7572 Mon Sep 17 00:00:00 2001 From: Georg Lauterbach Date: Wed, 21 Oct 2020 16:58:43 +0200 Subject: [PATCH 1/4] adjusting env files for clearer usage --- env-mailserver | 7 +++---- template.env | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/env-mailserver b/env-mailserver index da300849..4d76f5e1 100644 --- a/env-mailserver +++ b/env-mailserver @@ -1,7 +1,6 @@ - -# ----------------------------------------------------------------------------------------------------------------------------- -# --------------------- General Settings -------------------------------------------------------------------------------------- -# ----------------------------------------------------------------------------------------------------------------------------- +# ––––––––––––––––––––––––––––––––––––––––––––––– +# ––– Mailserver Environment Variables –––––––––– +# ––––––––––––––––––––––––––––––––––––––––––––––– # empty => uses the `hostname` command to get the mail server's canonical hostname # => Specify a fully-qualified domainname to serve mail for. This is used for many of the config features so if you can't set your hostname (e.g. you're in a container platform that doesn't let you) specify it in this environment variable. diff --git a/template.env b/template.env index b934fb7a..c146c234 100644 --- a/template.env +++ b/template.env @@ -1,6 +1,6 @@ -# ----------------------------------------------------------------------------------------------------------------------------- -# --------------------- General Settings -------------------------------------------------------------------------------------- -# ----------------------------------------------------------------------------------------------------------------------------- +# ––––––––––––––––––––––––––––––––––––––––––––––– +# ––– Docker Compose Settings Variables ––––––––– +# ––––––––––––––––––––––––––––––––––––––––––––––– HOSTNAME=mail DOMAINNAME=domain.com From f16e7f274ea3cea58d4ca56ad4db338921cb484b Mon Sep 17 00:00:00 2001 From: Georg Lauterbach Date: Wed, 21 Oct 2020 17:02:39 +0200 Subject: [PATCH 2/4] updating env files further --- README.md | 12 ++++++------ template.env => compose.env | 0 docker-compose.yml | 2 +- env-mailserver => mailserver.env | 0 4 files changed, 7 insertions(+), 7 deletions(-) rename template.env => compose.env (100%) rename env-mailserver => mailserver.env (100%) diff --git a/README.md b/README.md index d87eea9d..68f8be01 100644 --- a/README.md +++ b/README.md @@ -88,13 +88,13 @@ Minimum: ### Get the tools -Download the `docker-compose.yml`, `.env`, `env-mailserver` and the `setup.sh` files: +Download the `docker-compose.yml`, `compose.env`, `mailserver.env` and the `setup.sh` files: ``` BASH wget https://raw.githubusercontent.com/tomav/docker-mailserver/master/setup.sh wget https://raw.githubusercontent.com/tomav/docker-mailserver/master/docker-compose.yml -wget https://raw.githubusercontent.com/tomav/docker-mailserver/master/env-mailserver -curl -o .env https://raw.githubusercontent.com/tomav/docker-mailserver/master/template.env +wget https://raw.githubusercontent.com/tomav/docker-mailserver/master/mailserver.env +curl -o .env https://raw.githubusercontent.com/tomav/docker-mailserver/master/compose.env chmod a+x ./setup.sh ``` @@ -102,14 +102,14 @@ chmod a+x ./setup.sh ### Create a docker-compose environment - [Install the latest docker-compose](https://docs.docker.com/compose/install/) -- Edit the files `.env` and `env-mailserver` to your liking: +- Edit the files `.env` and `mailserver.env` to your liking: - `.env` contains the configuration for docker-compose - - `env-mailserver` contains the configuration for the mailserver container + - `mailserver.env` contains the configuration for the mailserver container - These files supports only simple `VAR=VAL` lines (see [Documentation](https://docs.docker.com/compose/env-file/)). - Don't quote your values. - Variable substitution is *not* supported (e.g. `OVERRIDE_HOSTNAME=$HOSTNAME.$DOMAINNAME`). -**Note:**: Variables in `.env` are expanded in the `docker-compose.yml` file **only** and **not** in the container. The file `env-mailserver` serves this case where environment variables are used in the container. +**Note:**: Variables in `.env` are expanded in the `docker-compose.yml` file **only** and **not** in the container. The file `mailserver.env` serves this case where environment variables are used in the container. **Note:** If you want to use a bare domain (host name equals domain name) see [FAQ](https://github.com/tomav/docker-mailserver/wiki/FAQ-and-Tips#can-i-use-nakedbare-domains-no-host-name). diff --git a/template.env b/compose.env similarity index 100% rename from template.env rename to compose.env diff --git a/docker-compose.yml b/docker-compose.yml index 92ae9dcc..cb49b308 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,7 +18,7 @@ services: - ./config/:/tmp/docker-mailserver/ env_file: - .env - - env-mailserver + - mailserver.env cap_add: - NET_ADMIN - SYS_PTRACE diff --git a/env-mailserver b/mailserver.env similarity index 100% rename from env-mailserver rename to mailserver.env From 8a5e6fd9e00674a9cebe683b4bad2d42232d2f00 Mon Sep 17 00:00:00 2001 From: Georg Lauterbach Date: Thu, 22 Oct 2020 09:37:51 +0200 Subject: [PATCH 3/4] removed .env from docker-compose.yml --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index cb49b308..82d32941 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,6 @@ services: - maillogs:/var/log/mail - ./config/:/tmp/docker-mailserver/ env_file: - - .env - mailserver.env cap_add: - NET_ADMIN From 7fde5ebe36cb3e70d781b0347b3258a86d49a60f Mon Sep 17 00:00:00 2001 From: Georg Lauterbach Date: Wed, 28 Oct 2020 15:44:34 +0100 Subject: [PATCH 4/4] re-trigger tests --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index 65e3ba2e..210bfde7 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,2 @@ +.github test/