diff --git a/Dockerfile b/Dockerfile index 6eed403..3ecf2b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ FROM debian:bullseye-slim # Base utilities RUN apt-get -o Acquire::ForceIPv4=true update \ - && apt-get install -yqq curl supervisor procps less zip unzip arj unrar-free lhasa arc logrotate cron libnspr4 \ + && apt-get -o Acquire::ForceIPv4=true install -yqq curl supervisor procps less zip unzip arj unrar-free lhasa arc logrotate cron \ && apt-get -y autoremove \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* @@ -14,14 +14,14 @@ RUN apt-get -o Acquire::ForceIPv4=true update \ RUN ln -sf /usr/share/zoneinfo/Australia/Melbourne /etc/localtime # Add NNCP -#RUN echo "deb http://deb.debian.org/debian bullseye-backports main" > /etc/apt/sources.list.d/backports.list -# -#RUN apt-get -o Acquire::ForceIPv4=true update \ -# && apt-get install -yyq nncp less ssmtp \ -# && mkdir /etc/nncp \ -# && apt-get -y autoremove \ -# && apt-get clean \ -# && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/log/nncp +RUN echo "deb http://deb.debian.org/debian bullseye-backports main" > /etc/apt/sources.list.d/backports.list + +RUN apt-get -o Acquire::ForceIPv4=true update \ + && apt-get -o Acquire::ForceIPv4=true install -yyq nncp less ssmtp \ + && mkdir /etc/nncp \ + && apt-get -y autoremove \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/log/nncp # Add in Leenooks' apt repository #RUN curl -sL http://apt.leenooks.net/setup.sh | DISTRO=bullseye bash @@ -48,7 +48,7 @@ RUN ln -sf /usr/share/zoneinfo/Australia/Melbourne /etc/localtime # Build SBBS COPY 0001-Feature-main-sbbs-404-Reserve-space-up-to-tagsBuffer.patch /tmp/ RUN apt-get -o Acquire::ForceIPv4=true update \ - && apt-get install -yqq git build-essential autoconf2.13 libnspr4-dev libncurses5-dev libncursesw5-dev libarchive-dev cvs wget python2.7 pkgconf libcap2-bin sudo libarchive13 \ + && apt-get install -yqq git build-essential autoconf2.13 libnspr4-dev libncurses5-dev libncursesw5-dev libarchive-dev wget python2.7 pkgconf libcap2-bin sudo libarchive13 libnspr4 \ && mkdir /opt/sbbs && cd /tmp \ && wget https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/install/GNUmakefile \ && git clone https://gitlab.com/SynchronetBBS/sbbs.git /opt/sbbs/repo \ @@ -60,7 +60,7 @@ RUN apt-get -o Acquire::ForceIPv4=true update \ && mv /opt/sbbs/xtrn /opt/sbbs/xtrn.orig \ && mkdir /opt/sbbs/nodes.orig && mv /opt/sbbs/node[1-5] /opt/sbbs/nodes.orig \ && find /opt/sbbs -name CVS -type d -exec rm -rf {} + \ - && SUDO_FORCE_REMOVE=yes apt-get -y purge git build-essential autoconf2.13 libnspr4-dev libncurses5-dev libarchive-dev libncursesw5-dev cvs wget pkgconf libcap2-bin sudo \ + && SUDO_FORCE_REMOVE=yes apt-get -y purge git build-essential autoconf2.13 libnspr4-dev libncurses5-dev libarchive-dev libncursesw5-dev wget pkgconf libcap2-bin sudo \ && apt-get -y autoremove \ && apt-get clean \ && rm -rf /opt/sbbs/repo \ @@ -77,13 +77,14 @@ WORKDIR /opt/sbbs ENV SBBSCTRL=/opt/sbbs/ctrl ENV SBBSEXEC=/opt/sbbs/exec ENV PATH=$PATH:${SBBSEXEC} -#ENV NNCPCFG /etc/nncp/nncp.conf +ENV NNCPCFG /etc/nncp/nncp.conf COPY start.sh ${SBBSEXEC}/ COPY doorparty.js ${SBBSEXEC}/ COPY main.cnf /opt/sbbs/ctrl.orig/ -#VOLUME [ "/var/lib/zerotier-one","/var/spool/nncp","/etc/nncp" ] +VOLUME [ "/var/lib/zerotier-one" ] +VOLUME [ "/var/spool/nncp","/etc/nncp" ] VOLUME [ "/opt/sbbs/data","/opt/sbbs/ctrl","/opt/sbbs/fido","/opt/sbbs/mods","/opt/sbbs/text" ] COPY logrotate.d /etc/logrotate.d/ diff --git a/start.sh b/start.sh index efc85b5..2a85cae 100755 --- a/start.sh +++ b/start.sh @@ -1,7 +1,7 @@ #!/bin/bash export SBBSCTRL=/opt/sbbs/ctrl -PIDFILE=/run/sbbs.pid +PIDFILE=${SBBSCTRL}/sbbs.pid # Proxy signals function kill_app(){ diff --git a/supervisord.d/nncp.conf b/supervisord.d/nncp.conf new file mode 100644 index 0000000..df9da2d --- /dev/null +++ b/supervisord.d/nncp.conf @@ -0,0 +1,5 @@ +[program:nncp] +#environment=NNCPCFG="/etc/nncp/nncp.conf" +command=/usr/bin/nncp-daemon -autotoss +startsecs=10 +startretries=2