Changed config volume to overrides volume
This commit is contained in:
@@ -47,7 +47,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /freeposte/freeposte:/data
|
- /freeposte/freeposte:/data
|
||||||
- /freeposte/certs:/certs
|
- /freeposte/certs:/certs
|
||||||
- /freeposte/config/postfix:/config
|
- /freeposte/overrides:/overrides
|
||||||
|
|
||||||
milter:
|
milter:
|
||||||
build: rmilter
|
build: rmilter
|
||||||
|
|||||||
@@ -6,25 +6,25 @@ for VARIABLE in `env | cut -f1 -d=`; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Override Postfix configuration
|
# Override Postfix configuration
|
||||||
if [ -f /config/main.cf ]; then
|
if [ -f /overrides/postfix.cf ]; then
|
||||||
while read line; do
|
while read line; do
|
||||||
postconf -e "$line"
|
postconf -e "$line"
|
||||||
done < /config/main.cf
|
done < /overrides/postfix.cf
|
||||||
echo "Loaded 'config/main.cf'"
|
echo "Loaded '/overrides/postfix.cf'"
|
||||||
else
|
else
|
||||||
echo "No extra postfix settings loaded because optional '/config/main.cf' not provided."
|
echo "No extra postfix settings loaded because optional '/overrides/postfix.cf' not provided."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Include table-map files
|
# Include table-map files
|
||||||
if ls -A /config/*.map 1> /dev/null 2>&1; then
|
if ls -A /overrides/*.map 1> /dev/null 2>&1; then
|
||||||
cp /config/*.map /etc/postfix/
|
cp /overrides/*.map /etc/postfix/
|
||||||
postmap /etc/postfix/*.map
|
postmap /etc/postfix/*.map
|
||||||
rm /etc/postfix/*.map
|
rm /etc/postfix/*.map
|
||||||
chown root:root /etc/postfix/*.db
|
chown root:root /etc/postfix/*.db
|
||||||
chmod 0600 /etc/postfix/*.db
|
chmod 0600 /etc/postfix/*.db
|
||||||
echo "Loaded 'map files'"
|
echo "Loaded 'map files'"
|
||||||
else
|
else
|
||||||
echo "No extra map files loaded because optional '/config/*.map' not provided."
|
echo "No extra map files loaded because optional '/overrides/*.map' not provided."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Actually run Postfix
|
# Actually run Postfix
|
||||||
|
|||||||
Reference in New Issue
Block a user