-
Notifications
You must be signed in to change notification settings - Fork 2
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
xss
committed
Jan 27, 2022
1 parent
7b5b2dc
commit d1ac930
Showing
5 changed files
with
105 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,34 @@ | ||
FROM ubuntu:21.04 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update && apt-get install -y libfftw3-dev libfftw3-3 xvfb qsstv pulseaudio build-essential git libsamplerate0-dev alsa-utils xvfb python3 python3-pip cmake && rm -rf /var/lib/apt/lists/* | ||
RUN apt-get update && apt-get install -y libfftw3-dev libfftw3-3 ffmpeg \ | ||
xvfb qsstv pulseaudio build-essential git libsamplerate0-dev alsa-utils \ | ||
xvfb python3 python3-pip cmake portaudio19-dev python-dev \ | ||
alsa-utils && rm -rf /var/lib/apt/lists/* | ||
|
||
# spy server | ||
RUN git clone https://github.com/miweber67/spyserver_client.git && cd spyserver_client && make && cp ss_client /usr/bin/ss_iq | ||
#csdr | ||
RUN cd / && git clone https://github.com/jketterl/csdr.git && mkdir -p csdr/build && cd csdr/build && cmake .. && make && make install && ldconfig | ||
# python dependencies | ||
RUN pip3 install Mastodon.py watchdog soundmeter | ||
#pulse server requiremeent | ||
RUN adduser root pulse-access | ||
|
||
# qsstv config | ||
RUN mkdir -p /root/.config/ON4QZ/ | ||
COPY qsstv_9.0.conf /root/.config/ON4QZ/qsstv_9.0.conf | ||
|
||
# poster script | ||
COPY poster.py /poster.py | ||
|
||
#copy monitor scripts | ||
COPY shutdown.sh /shutdown.sh | ||
RUN chmod a+x /shutdown.sh | ||
|
||
# startup script | ||
COPY run.sh /run.sh | ||
RUN chmod a+x /run.sh | ||
RUN adduser root pulse-access | ||
RUN pip3 install Mastodon.py watchdog | ||
COPY poster.py /poster.py | ||
ENTRYPOINT /run.sh | ||
|
||
ENTRYPOINT ["/bin/sh", "-c", "/run.sh"] | ||
VOLUME /images |
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,15 +1,35 @@ | ||
Skims SSTV off spyservers and uploads to mastodon. This setup is a POC and currently has no handling of qsstv failure, spyserver failure or mastodon script failure. Your milage may vary. I'd recommend reboot the container every 24 hours. | ||
Skims SSTV off spyservers using QSSTV and uploads to mastodon. This is a WIP and shouldn't be considered as stable. | ||
|
||
```sh | ||
docker run \ | ||
-e HOST= \ | ||
-e PORT= \ | ||
-e FREQ=14230000 \ | ||
-e M_USERNAME="" \ | ||
-e M_PASSWORD='' \ | ||
-e M_URL="https://botsin.space" \ | ||
-e M_CLIENT_ID='' \ | ||
-e M_CLIENT_SECRET='' \ | ||
-e MODE=USB \ | ||
--restart always \ | ||
--name sstv-20 \ | ||
ghcr.io/xssfox/sstv-skimmer:latest | ||
``` | ||
docker run -e HOST=blah -e PORT=1234 -e FREQ=14230000 --mount type=bind,source=/path/images,target=/images sstv | ||
``` | ||
env variables that need to be set: | ||
|
||
HOST : spy server hostname | ||
PORT : spy server port port | ||
FREQ : frequency for USB in HZ | ||
M_USERNAME : User name for mastodon instance | ||
M_PASSWORD : Password for mastodon instance | ||
M_URL : Mastodon url eg : "https://botsin.space" | ||
M_CLIENT_ID : Client ID | ||
M_CLIENT_SECRET : Client secret (see https://mastodonpy.readthedocs.io/en/stable/# for details on creating an app) | ||
|
||
|
||
|
||
Environment variables | ||
== | ||
These need to be in order for the skimmer to work | ||
|
||
| Name | Description | | ||
| ---- | ------------------------------------------------------------------------------------------------------------ | | ||
| HOST | spy server hostname | | ||
| PORT | spy server port port | | ||
| FREQ | frequency for USB in HZ | | ||
| MODE | USB or LSB | | ||
| M_USERNAME | User name for mastodon instance | | ||
| M_PASSWORD | Password for mastodon instance | | ||
| M_URL | Mastodon url eg : "https://botsin.space" | | ||
| M_CLIENT_ID | Client ID | | ||
| M_CLIENT_SECRET | Client secret (see https://mastodonpy.readthedocs.io/en/stable/# for details on creating an app) | |
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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
echo "Shutting down" | ||
pkill -f bash |