Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
kng authored Nov 24, 2020
1 parent 1bea8a9 commit b8ccbef
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM debian:buster
MAINTAINER sa2kng <[email protected]>

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install wget gnupg && rm -rf /var/lib/apt/lists/*
RUN echo deb http://download.opensuse.org/repositories/home:/librespace:/satnogs/Debian_10/ ./> /etc/apt/sources.list.d/satnogs.list
RUN wget -qO - http://download.opensuse.org/repositories/home:/librespace:/satnogs/Debian_10/Release.key | DEBIAN_FRONTEND=noninteractive apt-key --keyring /etc/apt/trusted.gpg.d/satnogs.gpg add -

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install supervisor software-properties-common libhamlib-utils vorbis-tools unzip git python3-pip python3-urllib3 python3-certifi python3-chardet python3-cycler python3-decorator python3-idna python3-kiwisolver python3-pyparsing python3-tz python3-tzlocal python3-libhamlib2 rtl-sdr satnogs-flowgraphs gr-soapy gr-satnogs && rm -rf /var/lib/apt/lists/*
#RUN pip3 install satnogs-client

RUN groupadd -g 995 satnogs && useradd -g satnogs -G dialout,plugdev -m -d /var/lib/satnogs -s /bin/false -u 999 satnogs
ADD supervisord.conf /etc/supervisor/supervisord.conf
#RUN echo "#!/bin/bash\n/usr/bin/rigctld -T 127.0.0.1 -m 1 &\n/usr/local/bin/satnogs-client" >> /usr/local/bin/satnogs-run.sh && chmod 0755 /usr/local/bin/satnogs-run.sh
RUN echo "#!/bin/bash\n/usr/bin/rigctld -T 127.0.0.1 -m 1 &\n/var/lib/satnogs/.local/bin/satnogs-client" >> /usr/local/bin/satnogs-run.sh && chmod 0755 /usr/local/bin/satnogs-run.sh
WORKDIR /var/lib/satnogs
USER satnogs
RUN pip3 install satnogs-client
RUN mkdir -p /var/lib/satnogs/.gnuradio/prefs/ && echo -n "gr::vmcircbuf_mmap_shm_open_factory" > /var/lib/satnogs/.gnuradio/prefs/vmcircbuf_default_factory
#RUN volk_profile

# choose to simply fork the rigctld in background and satnogs-client in foreground, or use supervisord for the two
CMD ["/usr/bin/supervisord","-c/etc/supervisor/supervisord.conf"]
#CMD ["/usr/local/bin/satnogs-run.sh"]

4 changes: 4 additions & 0 deletions docker_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
docker build -t satnogs-client:latest .
# --no-cache

2 changes: 2 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
docker run --name satnogs-node --device=/dev/bus/usb/ --tmpfs /tmp -v $(pwd)/satnogs-config:/var/lib/satnogs/.env -it satnogs-client:latest
12 changes: 12 additions & 0 deletions satnogs-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
SATNOGS_API_TOKEN=""
SATNOGS_STATION_ID=""
SATNOGS_STATION_LAT=""
SATNOGS_STATION_LON=""
SATNOGS_STATION_ELEV=""
SATNOGS_SOAPY_RX_DEVICE="driver=rtlsdr"
SATNOGS_RX_SAMP_RATE="1.024e6"
SATNOGS_PPM_ERROR="0"
SATNOGS_RF_GAIN="20.7"
SATNOGS_ANTENNA="RX"
SATNOGS_LOG_LEVEL="INFO"

19 changes: 19 additions & 0 deletions supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[supervisord]
nodaemon=true
user=satnogs
loglevel=debug

[program:satnogs]
#command=/usr/local/bin/satnogs-client
command=/var/lib/satnogs/.local/bin/satnogs-client
#stdout_logfile=/dev/fd/1
#stdout_logfile_maxbytes=0
#redirect_stderr=true
autostart=true
autorestart=true

[program:rigctld]
command=/usr/bin/rigctld -T 127.0.0.1 -m 1
autostart=true
autorestart=true

0 comments on commit b8ccbef

Please sign in to comment.