1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:36 +02:00
dockerfiles/owntracks/ot-recorder
2020-09-29 16:27:45 +08:00
..
arm add elasticdump 2020-09-16 19:01:06 +08:00
docker-compose.yml add elasticdump 2020-09-16 19:01:06 +08:00
docker-entrypoint.sh update owntracks 2019-10-20 09:05:35 +08:00
Dockerfile upgrade 2020-09-29 16:27:45 +08:00
README.md update owntracks 2019-10-20 09:05:35 +08:00

ot-recorder

The OwnTracks Recorder is a lightweight program for storing and accessing location data published via MQTT (or HTTP) by the OwnTracks apps.

docker-compose.yml

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=1883
      - 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

⚠️ Some variables don't work (OTR_QOS, OTR_CAFILE) as document said. You can pass any options to process via OTR_OPTIONS environment variable.

Click this to generate a google map api key.

up and running

$ docker-compse up -d
$ tree data
$ docker-compose exec recorder bash
>>> ocat --list
{"results":["foo"]}
>>> ocat --user foo --device bar