diff --git a/config/client.yaml b/config/client.yaml index 907e7fc..8398d5b 100644 --- a/config/client.yaml +++ b/config/client.yaml @@ -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: diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..cb89532 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,14 @@ +version: '3' +services: + client: + build: + dockerfile: docker/dockerfiles/Client.Dockerfile + context: . + command: python /opt/boswatch/bw_client.py -c client.yaml + devices: + - "/dev/bus/usb" + server: + build: + dockerfile: docker/dockerfiles/Server.Dockerfile + context: . + command: python /opt/boswatch/bw_server.py -c server.yaml \ No newline at end of file diff --git a/Dockerfile b/docker/dockerfiles/Client.Dockerfile similarity index 100% rename from Dockerfile rename to docker/dockerfiles/Client.Dockerfile diff --git a/docker/dockerfiles/Server.Dockerfile b/docker/dockerfiles/Server.Dockerfile new file mode 100644 index 0000000..e8f284f --- /dev/null +++ b/docker/dockerfiles/Server.Dockerfile @@ -0,0 +1,13 @@ +FROM alpine:3.10 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.6-alpine AS runner +LABEL maintainer="bastian@schroll-software.de" + +RUN pip3 install pyyaml + +RUN mkdir /log/ +COPY --from=boswatch /opt/boswatch/ /opt/boswatch/ +COPY ./config/* /opt/boswatch/config/