From 369f66b0752ffffadc7cfb9fcb3a7543c550238b Mon Sep 17 00:00:00 2001 From: kev Date: Wed, 2 Oct 2019 08:12:13 +0800 Subject: [PATCH] fix ot-recorder --- ot-recorder/Dockerfile | 2 +- ot-recorder/arm/Dockerfile | 2 +- ot-recorder/arm/docker-compose.yml | 2 +- ot-recorder/arm/docker-entrypoint.sh | 2 +- ot-recorder/docker-compose.yml | 45 ++++++++++++++++++---------- ot-recorder/docker-entrypoint.sh | 2 +- 6 files changed, 34 insertions(+), 21 deletions(-) diff --git a/ot-recorder/Dockerfile b/ot-recorder/Dockerfile index c412822..b648b01 100644 --- a/ot-recorder/Dockerfile +++ b/ot-recorder/Dockerfile @@ -18,7 +18,7 @@ ENV OTR_HOST iot.eclipse.org ENV OTR_PORT 1883 ENV OTR_HTTPHOST 0.0.0.0 ENV OTR_HTTPPORT 8083 -ENV OTR_TOPICS owntracks/+/+ +ENV OTR_TOPICS owntracks/# ENV OTR_STORAGEDIR /var/spool/owntracks/recorder/store VOLUME $OTR_STORAGEDIR diff --git a/ot-recorder/arm/Dockerfile b/ot-recorder/arm/Dockerfile index 6ddb9d3..69a3b6c 100644 --- a/ot-recorder/arm/Dockerfile +++ b/ot-recorder/arm/Dockerfile @@ -18,7 +18,7 @@ ENV OTR_HOST iot.eclipse.org ENV OTR_PORT 1883 ENV OTR_HTTPHOST 0.0.0.0 ENV OTR_HTTPPORT 8083 -ENV OTR_TOPICS owntracks/+/+ +ENV OTR_TOPICS owntracks/# ENV OTR_STORAGEDIR /var/spool/owntracks/recorder/store VOLUME $OTR_STORAGEDIR diff --git a/ot-recorder/arm/docker-compose.yml b/ot-recorder/arm/docker-compose.yml index eb0034f..abbb8ca 100644 --- a/ot-recorder/arm/docker-compose.yml +++ b/ot-recorder/arm/docker-compose.yml @@ -11,6 +11,6 @@ ot-recorder: - OTR_PASS=password - OTR_CAFILE=/etc/ssl/certs/DST_Root_CA_X3.pem - OTR_TOPICS=owntracks/# - - OTR_BROWSERAPIKEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + # OTR_BROWSERAPIKEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # OTR_OPTIONS=--debug restart: always diff --git a/ot-recorder/arm/docker-entrypoint.sh b/ot-recorder/arm/docker-entrypoint.sh index 04111fc..e75ff3b 100755 --- a/ot-recorder/arm/docker-entrypoint.sh +++ b/ot-recorder/arm/docker-entrypoint.sh @@ -10,4 +10,4 @@ then ot-recorder --initialize fi -exec ot-recorder --http-host $OTR_HTTPHOST --http-port $OTR_HTTPPORT $OTR_OPTIONS ${OTR_TOPICS:-owntracks/+/+} +exec ot-recorder --http-host $OTR_HTTPHOST --http-port $OTR_HTTPPORT $OTR_OPTIONS ${OTR_TOPICS:-owntracks/#} diff --git a/ot-recorder/docker-compose.yml b/ot-recorder/docker-compose.yml index e7cc324..33dd5b9 100644 --- a/ot-recorder/docker-compose.yml +++ b/ot-recorder/docker-compose.yml @@ -1,16 +1,29 @@ -ot-recorder: - image: vimagick/ot-recorder - ports: - - "8083:8083" - volumes: - - ./data:/var/spool/owntracks/recorder/store - environment: - - OTR_HOST=iot.eclipse.org - - OTR_PORT=8883 - - OTR_USER=username - - OTR_PASS=password - - OTR_CAFILE=/etc/ssl/certs/DST_Root_CA_X3.pem - - OTR_TOPICS=owntracks/# - - OTR_BROWSERAPIKEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - # OTR_OPTIONS=--debug - restart: always +version: "3.7" + +services: + + recorder: + image: vimagick/ot-recorder + ports: + - "8083:8083" + volumes: + - ./data:/var/spool/owntracks/recorder/store + environment: + - OTR_HOST=iot.eclipse.org + - OTR_PORT=8883 + - OTR_USER=username + - OTR_PASS=password + - OTR_TOPICS=owntracks/# + - OTR_CAFILE=/etc/ssl/certs/DST_Root_CA_X3.pem + # OTR_BROWSERAPIKEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + # OTR_OPTIONS=--debug + restart: unless-stopped + + frontend: + image: owntracks/frontend + ports: + - 8080:80 + environment: + - SERVER_HOST=recorder + - SERVER_PORT=8083 + restart: unless-stopped diff --git a/ot-recorder/docker-entrypoint.sh b/ot-recorder/docker-entrypoint.sh index 04111fc..e75ff3b 100755 --- a/ot-recorder/docker-entrypoint.sh +++ b/ot-recorder/docker-entrypoint.sh @@ -10,4 +10,4 @@ then ot-recorder --initialize fi -exec ot-recorder --http-host $OTR_HTTPHOST --http-port $OTR_HTTPPORT $OTR_OPTIONS ${OTR_TOPICS:-owntracks/+/+} +exec ot-recorder --http-host $OTR_HTTPHOST --http-port $OTR_HTTPPORT $OTR_OPTIONS ${OTR_TOPICS:-owntracks/#}