Open jaydouble opened 1 year ago
Dear @jaydouble , thank you very much for the contribution; the code looks good!
However, I think it would be better not to introduce another parameter for SMF, which might make it more complicated.
Could you please provide a helper script for loading the data from the file and outputting the string which can satisfy the SMF_CONFIG
format?
It would be perfect like this:
$ export SMF_CONFIG=`./scripts/smf-config-file.sh smf.config`
# ...
Maybe better to let the user chose: If he doesn't want to have a file variable, he can use:
export SMF_CONFIG=$(cat smf.config)
docker run -e SMF_CONFIG ....
If he want to use a config file variable, like when using a docker swarm he can use:
version: "3.8"
volumes:
config:
services:
smf:
image: zixia/simple-mail-forwarder
volumes:
- config:/config
ports:
- 25:25
environment:
SMF_CONFIG_FILE: "/config/forwards"
added
SMF_CONFIG_FILE
variable to use a file for config. to add file, be creative, you can use a bind mount, but also a secret. A bit easier to read if you have more than one forward to make. Maybe also a bit less change for misstakes.