-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,41 @@ | ||
FROM dockurr/strfry:0.9.6 | ||
FROM ubuntu:jammy | ||
ENV TZ=Europe/London | ||
|
||
RUN apk add --no-cache torsocks | ||
RUN apt update && apt install -y --no-install-recommends \ | ||
git g++ make pkg-config libtool ca-certificates \ | ||
libssl-dev zlib1g-dev liblmdb-dev libflatbuffers-dev \ | ||
libsecp256k1-dev libzstd-dev | ||
|
||
# setup app | ||
RUN git clone https://github.com/KoalaSat/strfry /app | ||
|
||
WORKDIR /app | ||
|
||
RUN git submodule update --init | ||
RUN make setup-golpe | ||
RUN make clean | ||
RUN make -j4 | ||
|
||
RUN apt update && apt install -y --no-install-recommends \ | ||
liblmdb0 libflatbuffers1 libsecp256k1-0 libb2-1 libzstd1 torsocks cron\ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN echo "TorAddress 127.0.0.1" >> /etc/tor/torsocks.conf | ||
RUN echo "TorPort 9050" >> /etc/tor/torsocks.conf | ||
|
||
# Setting up crontab | ||
COPY crontab /tmp/crontab | ||
RUN cat /tmp/crontab > /etc/crontabs/root | ||
COPY crontab /etc/cron.d/crontab | ||
RUN chmod 0644 /etc/cron.d/crontab | ||
RUN crontab /etc/cron.d/crontab | ||
|
||
# Setting up entrypoints | ||
COPY sync.sh /etc/strfry/sync.sh | ||
COPY entrypoint.sh /etc/strfry/entrypoint.sh | ||
|
||
RUN chmod +x /etc/strfry/entrypoint.sh | ||
RUN chmod +x /etc/strfry/sync.sh | ||
|
||
#Setting up logs | ||
RUN touch /var/log/cron.log && chmod 0644 /var/log/cron.log | ||
|
||
ENTRYPOINT ["/etc/strfry/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh | ||
|
||
crond -f -l 8 & /app/strfry.sh | ||
cron -f -l 8 & tail -f /var/log/cron.log & /app/strfry relay |