add dockerfile for server, add docker-compose, change dockerfile for client

This commit is contained in:
Jan Speller 2020-03-07 15:56:48 +01:00 committed by Jan Speller
parent fc39b15d54
commit ea8fd94926
4 changed files with 28 additions and 1 deletions

View file

@ -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:

14
docker-compose.yaml Normal file
View file

@ -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

View file

@ -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/