change entrypoint

This commit is contained in:
joseelinchevalay 2020-03-23 08:52:28 +01:00
parent 4d1071d3a7
commit faef88183b
4 changed files with 39 additions and 2 deletions

View File

@ -62,16 +62,23 @@ WORKDIR /dup-mnemonic-rs
RUN cargo build --release && \
cp target/release/dup-mnemonic /usr/local/bin
COPY ./docker/config /home/astroport/.ssb/
COPY ./docker/run-ssb-pub.sh /home/astroport/
COPY ./docker/docker-entrypoint.sh /home/astroport/
RUN chmod +x /home/astroport/run-ssb-pub.sh /home/astroport/docker-entrypoint.sh
USER astroport
WORKDIR /home/astroport
RUN . ~/.bashrc && \
mkdir -p /home/astroport/.ssb/ && \
npm install sodium-native@3.0.0 ssb-backlinks@1.0.0 && \
npm install -g sodium-native@3.0.0 ssb-backlinks@1.0.0 && \
npm install -g ssb-server@15.2.0
VOLUME [ "/home/astroport/.ssb/" ]
EXPOSE 8008
ENTRYPOINT [ "/bin/bash" ]
CMD ["process-likes-g1tx"]
CMD ["docker-entrypoint.sh"]

19
docker/config Normal file
View File

@ -0,0 +1,19 @@
{
"connections": {
"incoming": {
"net": [
{
"scope": "public", "external": ["127.0.0.1"], "transform": "shs", "port": 8008
},
{ "scope": "private", "transform": "shs", "port": 8008, "host": "127.0.0.1" }
]
},
"outgoing": {
"net": [
{
"transform": "shs"
}
]
}
}
}

View File

@ -0,0 +1,7 @@
#!/bin/bash
. ~/.bashrc
echo "run ssb-server"
bash /home/astroport/run-ssb-pub.sh
tail -f /dev/null

4
docker/run-ssb-pub.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
while true; do
ssb-server start --host 127.0.0.1
done