Add Doorparty Connector
This commit is contained in:
parent
60af119bb9
commit
3313d5e330
33
Dockerfile
33
Dockerfile
@ -44,6 +44,36 @@ RUN apt-get update \
|
|||||||
&& rm -rf /opt/sbbs/repo \
|
&& rm -rf /opt/sbbs/repo \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
# Add Doorparty
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -yqq golang git \
|
||||||
|
&& cd /tmp && git clone https://github.com/echicken/dpc2 \
|
||||||
|
&& cd dpc2 && echo -n 'ZGlmZiAtLWdpdCBhL2Rvb3JwYXJ0eS1jb25uZWN0b3IuZ28gYi9kb29ycGFydHktY29ubmVjdG9y\
|
||||||
|
LmdvCmluZGV4IDE4NzNhZTUuLjc3NmFhOGUgMTAwNjQ0Ci0tLSBhL2Rvb3JwYXJ0eS1jb25uZWN0\
|
||||||
|
b3IuZ28KKysrIGIvZG9vcnBhcnR5LWNvbm5lY3Rvci5nbwpAQCAtMTMyLDcgKzEzMiw3IEBAIGZ1\
|
||||||
|
bmMgaW5pdCgpIHsKIAogZnVuYyBtYWluKCkgewogCi0JY2ZnLCBlcnIgOj0gaW5pLkxvYWQoImRv\
|
||||||
|
b3JwYXJ0eS1jb25uZWN0b3IuaW5pIikKKwljZmcsIGVyciA6PSBpbmkuTG9hZCgiL29wdC9zYmJz\
|
||||||
|
L2N0cmwvZG9vcnBhcnR5LWNvbm5lY3Rvci5pbmkiKQogCWlmIGVyciAhPSBuaWwgewogCQlsb2cu\
|
||||||
|
RmF0YWxmKCJFcnJvciByZWFkaW5nIGRvb3JwYXJ0eS1jb25uZWN0b3IuaW5pOiAldiIsIGVycikK\
|
||||||
|
IAl9Cg=='|base64 -d |git apply \
|
||||||
|
&& go get gopkg.in/ini.v1 \
|
||||||
|
&& go get golang.org/x/crypto/ssh \
|
||||||
|
&& go build -i doorparty-connector.go \
|
||||||
|
&& echo -n 'LS0tIC9zcnYvZG9ja2VyL3NiYnMvbW9kcy9kb29ycGFydHkuanMJMjAyMS0wMS0xMyAyMjozNTox\
|
||||||
|
Ni4wNzQyNzk2MDggKzExMDAKKysrIC4vc3luY2hyb25ldC9kb29ycGFydHkuanMJMjAyMS0wMS0x\
|
||||||
|
MyAyMzoyMjoyMi44MzgwNjU4MzIgKzExMDAKQEAgLTMzLDcgKzMzLDcgQEAKICAgICAoY2ZnLnR1\
|
||||||
|
bm5lbF9ob3N0IHx8ICdsb2NhbGhvc3QnKSArICc6JyArIChjZmcudHVubmVsX3BvcnQgfHwgOTk5\
|
||||||
|
OSksCiAgICAgZ2V0X3Bhc3N3b3JkKCksIC8vIHBhc3N3b3JkCiAgICAgdXNlci5hbGlhcywKLSAg\
|
||||||
|
ICBhcmd2Lmxlbmd0aCA/IGFyZ3ZbMF0gOiB1bmRlZmluZWQKKyAgICBhcmd2Lmxlbmd0aCA/ICd4\
|
||||||
|
dHJuPScrYXJndlswXSA6IHVuZGVmaW5lZAogKTsKIAogY29uc29sZS5hdHRyaWJ1dGVzID0gYXR0\
|
||||||
|
cjsK'|base64 -d |git apply \
|
||||||
|
&& mv doorparty-connector synchronet/doorparty.js /opt/sbbs/exec \
|
||||||
|
&& mv doorparty-connector.ini /opt/sbbs/ctrl.orig \
|
||||||
|
&& apt-get -y purge golang git \
|
||||||
|
&& apt-get -y autoremove \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
# Add PHP
|
# Add PHP
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -yqq composer php-cgi php-fpm php-gd php-sqlite3 php-xml \
|
&& apt-get install -yqq composer php-cgi php-fpm php-gd php-sqlite3 php-xml \
|
||||||
@ -57,10 +87,11 @@ ENV SBBSEXEC=/opt/sbbs/exec
|
|||||||
ENV PATH=$PATH:${SBBSEXEC}
|
ENV PATH=$PATH:${SBBSEXEC}
|
||||||
|
|
||||||
COPY start.sh ${SBBSEXEC}/
|
COPY start.sh ${SBBSEXEC}/
|
||||||
|
COPY doorparty.sh ${SBBSEXEC}/
|
||||||
COPY main.cnf /opt/sbbs/ctrl.orig/
|
COPY main.cnf /opt/sbbs/ctrl.orig/
|
||||||
|
|
||||||
VOLUME [ "/var/lib/zerotier-one" ]
|
VOLUME [ "/var/lib/zerotier-one" ]
|
||||||
VOLUME [ "/opt/sbbs/data","/opt/sbbs/ctrl","/opt/sbbs/fido","/opt/sbbs/text" ]
|
VOLUME [ "/opt/sbbs/data","/opt/sbbs/ctrl","/opt/sbbs/fido","/opt/sbbs/mods","/opt/sbbs/text" ]
|
||||||
|
|
||||||
COPY logrotate.d /etc/logrotate.d/
|
COPY logrotate.d /etc/logrotate.d/
|
||||||
RUN chmod 644 /etc/logrotate.d/*
|
RUN chmod 644 /etc/logrotate.d/*
|
||||||
|
1
init
1
init
@ -11,6 +11,7 @@ if [ ! -e "${SBBSCTRL}/sbbs.ini" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "${SBBSCTRL}/../nodes/node1" ]; then
|
if [ ! -d "${SBBSCTRL}/../nodes/node1" ]; then
|
||||||
|
[ ! -d "${SBBSCTRL}/../nodes" ] && mkdir ${SBBSCTRL}/../nodes
|
||||||
echo "* Installing SBBS nodes files into ${SBBSCTRL}/../nodes"
|
echo "* Installing SBBS nodes files into ${SBBSCTRL}/../nodes"
|
||||||
cp -Ra ${SBBSCTRL}/../nodes.orig/* ${SBBSCTRL}/../nodes/
|
cp -Ra ${SBBSCTRL}/../nodes.orig/* ${SBBSCTRL}/../nodes/
|
||||||
fi
|
fi
|
||||||
|
3
supervisord.d/doorparty.conf
Normal file
3
supervisord.d/doorparty.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[program:doorparty]
|
||||||
|
command=/opt/sbbs/exec/doorparty-connector
|
||||||
|
stopwaitsecs=60
|
Loading…
Reference in New Issue
Block a user