mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-01-07 01:00:58 +01:00
Merge fe48da9c63 into 22f1b7dc29
This commit is contained in:
commit
3d8a835aef
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
|
||||
RUN apk add git make cmake g++ libusb-dev libpulse
|
||||
FROM alpine:latest AS build-base
|
||||
RUN apk add --no-cache git make cmake g++ libusb-dev libpulse
|
||||
|
||||
FROM build-base AS rtl_fm
|
||||
ARG RTL_SDR_VERSION=0.6.0
|
||||
RUN git clone --depth 1 --branch ${RTL_SDR_VERSION} https://github.com/osmocom/rtl-sdr.git /opt/rtl_sdr
|
||||
RUN git clone --depth 1 https://gitea.osmocom.org/sdr/rtl-sdr.git /opt/rtl_sdr
|
||||
WORKDIR /opt/rtl_sdr/build
|
||||
RUN cmake .. && make
|
||||
RUN make install
|
||||
|
||||
FROM build-base AS multimon
|
||||
ARG MULTIMON_VERSION=1.1.9
|
||||
RUN git clone --depth 1 --branch ${MULTIMON_VERSION} https://github.com/EliasOenal/multimon-ng.git /opt/multimon
|
||||
RUN git clone --depth 1 https://github.com/EliasOenal/multimon-ng.git /opt/multimon
|
||||
WORKDIR /opt/multimon/build
|
||||
RUN cmake .. && make
|
||||
|
||||
FROM alpine:3.13 AS boswatch
|
||||
FROM alpine:latest AS boswatch
|
||||
ARG BW_VERSION=develop
|
||||
RUN apk add git && \
|
||||
git clone --depth 1 --branch ${BW_VERSION} https://github.com/BOSWatch/BW3-Core.git /opt/boswatch
|
||||
|
||||
|
||||
FROM python:3.9.1-alpine AS runner
|
||||
LABEL maintainer="bastian@schroll-software.de"
|
||||
FROM python:alpine AS client
|
||||
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
|
||||
RUN apk add libusb-dev libpulse && \
|
||||
pip3 install pyyaml
|
||||
RUN apk add libusb-dev libpulse
|
||||
RUN pip3 install pyyaml
|
||||
|
||||
COPY --from=boswatch /opt/boswatch/ /opt/boswatch/
|
||||
COPY --from=multimon /opt/multimon/build/multimon-ng /opt/multimon-ng
|
||||
COPY --from=rtl_fm /opt/rtl_sdr/build/src/ /opt/rtl_sdr
|
||||
COPY --from=multimon /opt/multimon/build/multimon-ng /opt/multimon/multimon-ng
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
inputSource:
|
||||
|
|
@ -27,7 +27,7 @@ inputSource:
|
|||
squelch: 1
|
||||
gain: 100
|
||||
#fir_size: 0
|
||||
rtlPath: /usr/local/bin/rtl_fm
|
||||
rtlPath: /opt/rtl_sdr/rtl_fm
|
||||
lineIn:
|
||||
card: 1
|
||||
device: 0
|
||||
|
|
@ -38,5 +38,5 @@ decoder:
|
|||
poc512: yes
|
||||
poc1200: yes
|
||||
poc2400: yes
|
||||
Path: /opt/multimon/multimon-ng
|
||||
path: /opt/multimon/multimon-ng
|
||||
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
|
||||
mkdocs
|
||||
|
||||
# for develope only
|
||||
# for develop only
|
||||
pytest
|
||||
pytest-cov
|
||||
flake8==6.1.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue