Skip to content

Commit

Permalink
Merge pull request #736 from anarkiwi/check
Browse files Browse the repository at this point in the history
Serve waterfalls from container
  • Loading branch information
anarkiwi authored Jun 22, 2023
2 parents 8e952eb + 18e52b5 commit 837dbf1
Show file tree
Hide file tree
Showing 6 changed files with 443 additions and 247 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ jobs:
docker run -t iqtlabs/gamutrf:latest gamutrf-api --help
docker run -t iqtlabs/gamutrf:latest gamutrf-samples2raw --help
docker run -t iqtlabs/gamutrf:latest gamutrf-freqxlator --help
docker run -t iqtlabs/gamutrf:latest gamutrf-waterfall --help
sudo apt-get update && sudo apt-get install -qy python3-pip
docker compose -f orchestrator.yml -f worker.yml -f monitoring.yml -f specgram.yml build
6 changes: 6 additions & 0 deletions gamutrf/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from gamutrf.scan import main as scan_main
from gamutrf.sigfinder import main as sigfinder_main
from gamutrf.specgram import main as specgram_main
from gamutrf.waterfall import main as waterfall_main


def api():
Expand Down Expand Up @@ -35,3 +36,8 @@ def sigfinder():
def specgram():
"""Entrypoint for specgram"""
specgram_main()


def waterfall():
"""Entrypoint for waterfall"""
waterfall_main()
4 changes: 3 additions & 1 deletion gamutrf/flask_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def __init__(self, options, check_options, banned_args):
self.app.add_url_rule("/reconf", "reconf", self.reconf)
self.request = request
self.thread = threading.Thread(
target=self.app.run, kwargs={"port": options.apiport}, daemon=True
target=self.app.run,
kwargs={"host": "0.0.0.0", "port": options.apiport}, # nosec
daemon=True,
)

def start(self):
Expand Down
Loading

0 comments on commit 837dbf1

Please sign in to comment.