mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-04-02 02:54:38 +02:00
Merge fe48da9c63 into 7d4cb57a6e
This commit is contained in:
commit
d02dbace7c
27
.github/workflows/build_image.yml
vendored
Normal file
27
.github/workflows/build_image.yml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
name: Build Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- feature/docker
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build the Docker image for the Client
|
||||||
|
run: docker build . --file Dockerfile --target client --tag ghcr.io/janspeller/bw3-core/client:latest
|
||||||
|
- name: Build the Docker image for the Server
|
||||||
|
run: docker build . --file Dockerfile --target server --tag ghcr.io/janspeller/bw3-core/server:latest
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GH_PAT }}
|
||||||
|
- name: Push the Client Docker image to Github package repository
|
||||||
|
run: docker push ghcr.io/janspeller/bw3-core/client:latest
|
||||||
|
- name: Push the Server Docker image to Github package repository
|
||||||
|
run: docker push ghcr.io/janspeller/bw3-core/server:latest
|
||||||
40
Dockerfile
Normal file → Executable file
40
Dockerfile
Normal file → Executable file
|
|
@ -1,31 +1,45 @@
|
||||||
FROM alpine:3.13 AS build-base
|
FROM alpine:latest AS build-base
|
||||||
RUN apk add git make cmake g++ libusb-dev libpulse
|
RUN apk add --no-cache git make cmake g++ libusb-dev libpulse
|
||||||
|
|
||||||
FROM build-base AS rtl_fm
|
FROM build-base AS rtl_fm
|
||||||
ARG RTL_SDR_VERSION=0.6.0
|
RUN git clone --depth 1 https://gitea.osmocom.org/sdr/rtl-sdr.git /opt/rtl_sdr
|
||||||
RUN git clone --depth 1 --branch ${RTL_SDR_VERSION} https://github.com/osmocom/rtl-sdr.git /opt/rtl_sdr
|
|
||||||
WORKDIR /opt/rtl_sdr/build
|
WORKDIR /opt/rtl_sdr/build
|
||||||
RUN cmake .. && make
|
RUN cmake .. && make
|
||||||
|
RUN make install
|
||||||
|
|
||||||
FROM build-base AS multimon
|
FROM build-base AS multimon
|
||||||
ARG MULTIMON_VERSION=1.1.9
|
RUN git clone --depth 1 https://github.com/EliasOenal/multimon-ng.git /opt/multimon
|
||||||
RUN git clone --depth 1 --branch ${MULTIMON_VERSION} https://github.com/EliasOenal/multimon-ng.git /opt/multimon
|
|
||||||
WORKDIR /opt/multimon/build
|
WORKDIR /opt/multimon/build
|
||||||
RUN cmake .. && make
|
RUN cmake .. && make
|
||||||
|
|
||||||
FROM alpine:3.13 AS boswatch
|
FROM alpine:latest AS boswatch
|
||||||
ARG BW_VERSION=develop
|
ARG BW_VERSION=develop
|
||||||
RUN apk add git && \
|
RUN apk add git && \
|
||||||
git clone --depth 1 --branch ${BW_VERSION} https://github.com/BOSWatch/BW3-Core.git /opt/boswatch
|
git clone --depth 1 --branch ${BW_VERSION} https://github.com/BOSWatch/BW3-Core.git /opt/boswatch
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.9.1-alpine AS runner
|
FROM python:alpine AS client
|
||||||
LABEL maintainer="bastian@schroll-software.de"
|
LABEL org.opencontainers.image.authors="info@schroll-it.de,jan@speller.biz"
|
||||||
|
LABEL org.opencontainers.image.source=https://github.com/janspeller/BW3-Core
|
||||||
|
|
||||||
# for RTL for MM
|
# for RTL for MM
|
||||||
RUN apk add libusb-dev libpulse && \
|
RUN apk add libusb-dev libpulse
|
||||||
pip3 install pyyaml
|
RUN pip3 install pyyaml
|
||||||
|
|
||||||
COPY --from=boswatch /opt/boswatch/ /opt/boswatch/
|
COPY --from=boswatch /opt/boswatch/ /opt/boswatch/
|
||||||
COPY --from=multimon /opt/multimon/build/multimon-ng /opt/multimon-ng
|
COPY --from=multimon /opt/multimon/build/multimon-ng /opt/multimon/multimon-ng
|
||||||
COPY --from=rtl_fm /opt/rtl_sdr/build/src/ /opt/rtl_sdr
|
COPY --from=rtl_fm /usr/local/bin/rtl_fm /opt/rtl_sdr/rtl_fm
|
||||||
|
COPY --from=rtl_fm /usr/local/lib/librtlsdr.so.0 /usr/local/lib/librtlsdr.so.0
|
||||||
|
|
||||||
|
WORKDIR /opt/boswatch
|
||||||
|
CMD python3 /opt/boswatch/bw_client.py -c client.yaml
|
||||||
|
|
||||||
|
FROM python:alpine AS server
|
||||||
|
LABEL org.opencontainers.image.authors="info@schroll-it.de,jan@speller.biz"
|
||||||
|
LABEL org.opencontainers.image.source=https://github.com/janspeller/BW3-Core
|
||||||
|
|
||||||
|
RUN pip3 install pyyaml
|
||||||
|
COPY --from=boswatch /opt/boswatch/ /opt/boswatch/
|
||||||
|
WORKDIR /opt/boswatch
|
||||||
|
CMD python3 /opt/boswatch/bw_server.py -c server.yaml
|
||||||
|
EXPOSE 8080
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ client:
|
||||||
sendDelay: 3 # time in seconds to delay the resend try
|
sendDelay: 3 # time in seconds to delay the resend try
|
||||||
|
|
||||||
server: # only used if useBroadcast = no
|
server: # only used if useBroadcast = no
|
||||||
ip: 127.0.0.1
|
ip: 127.0.0.1 # use service name if you are running docker
|
||||||
port: 8080
|
port: 8080
|
||||||
|
|
||||||
inputSource:
|
inputSource:
|
||||||
|
|
@ -27,7 +27,7 @@ inputSource:
|
||||||
squelch: 1
|
squelch: 1
|
||||||
gain: 100
|
gain: 100
|
||||||
#fir_size: 0
|
#fir_size: 0
|
||||||
rtlPath: /usr/local/bin/rtl_fm
|
rtlPath: /opt/rtl_sdr/rtl_fm
|
||||||
lineIn:
|
lineIn:
|
||||||
card: 1
|
card: 1
|
||||||
device: 0
|
device: 0
|
||||||
|
|
@ -38,5 +38,5 @@ decoder:
|
||||||
poc512: yes
|
poc512: yes
|
||||||
poc1200: yes
|
poc1200: yes
|
||||||
poc2400: yes
|
poc2400: yes
|
||||||
Path: /opt/multimon/multimon-ng
|
path: /opt/multimon/multimon-ng
|
||||||
char: DE
|
char: DE
|
||||||
|
|
|
||||||
13
docker-compose.yaml
Normal file
13
docker-compose.yaml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
client:
|
||||||
|
image: ghcr.io/janspeller/bw3-core/client:latest
|
||||||
|
volumes:
|
||||||
|
- ./config:/opt/boswatch/config
|
||||||
|
- ./log:/opt/boswatch/log
|
||||||
|
devices:
|
||||||
|
- "/dev/bus/usb"
|
||||||
|
server:
|
||||||
|
image: ghcr.io/janspeller/bw3-core/server:latest
|
||||||
|
volumes:
|
||||||
|
- ./config:/opt/boswatch/config
|
||||||
|
|
@ -5,7 +5,7 @@ pyyaml
|
||||||
# for documentation generating
|
# for documentation generating
|
||||||
mkdocs
|
mkdocs
|
||||||
|
|
||||||
# for develope only
|
# for develop only
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
flake8==6.1.0
|
flake8==6.1.0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue