🎨 Improve voluming

This commit is contained in:
Yohann D'anello 2020-07-15 14:54:13 +02:00
parent efb9543f55
commit f248a5c7cf
2 changed files with 14 additions and 10 deletions

View File

@ -56,15 +56,16 @@ COPY virtual.sympa.template /etc/sympa/virtual.sympa.template
COPY robot.conf.template /etc/sympa/robot.conf.template
COPY nginx.conf.template /etc/nginx/site.conf.template
RUN mkdir /etc/sympa/transport && \
touch /etc/sympa/transport/sympa_transport && \
ln -s /etc/sympa/transport/sympa_transport /etc/sympa/sympa_transport
COPY wwsympa /etc/init.d/wwsympa
RUN chmod +x /etc/init.d/wwsympa
RUN touch /etc/sympa/transport.sympa \
/etc/sympa/virtual.sympa \
/etc/sympa/sympa_transport && \
chmod 0640 /etc/sympa/sympa_transport && \
chown sympa:sympa /etc/sympa/sympa_transport \
/etc/sympa/*.sympa
/etc/sympa/virtual.sympa && \
chown sympa:sympa /etc/sympa/*.sympa
RUN postmap hash:/etc/sympa/transport.sympa && \
postmap hash:/etc/sympa/virtual.sympa
@ -79,6 +80,7 @@ EXPOSE 25 80 465
VOLUME /var/lib/sympa \
/var/spool/sympa \
/etc/sympa/robots
/etc/sympa/robots \
/etc/sympa/transport
ENV DOMAINS="localhost"

View File

@ -4,10 +4,8 @@ cat /etc/sympa/sympa/sympa.conf.template | sed "s/{{MAIN_LIST_DOMAIN}}/$MAIN_LIS
rm /etc/postfix/main.cf && cat /etc/postfix/main.cf.template | sed "s/{{MAIN_LIST_DOMAIN}}/$MAIN_LIST_DOMAIN/g" > /etc/postfix/main.cf
[[ -d /var/lib/sympa/bounce ]] || mkdir -p /var/lib/sympa/bounce
chown -R sympa:sympa /etc/sympa/sympa_transport \
/var/spool/sympa \
/var/lib/sympa
[[ -d /etc/sympa/transport ]] || mkdir -p /etc/sympa/transport
touch /etc/sympa/transport/sympa_transport
LIST_DOMAINS=$(echo $DOMAINS | tr ";" "\n")
[[ ! -f /etc/sympa/transport.sympa ]] || rm /etc/sympa/transport.sympa
@ -32,6 +30,10 @@ do
echo "Domain $domain added!"
done
chown -R sympa:sympa /etc/sympa/transport \
/var/spool/sympa \
/var/lib/sympa
chown -R www-data:www-data /etc/nginx/sites-available /etc/nginx/sites-enabled
service rsyslog restart