1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00

add ot-recorder

This commit is contained in:
kev 2017-03-31 16:35:00 +08:00
parent e230f16705
commit 0c3b1f5abd
8 changed files with 103 additions and 0 deletions

View File

@ -79,6 +79,8 @@ A collection of delicious docker recipes.
- [x] nullmailer-arm
- [x] openhab
- [x] openssh
- [x] ot-recorder
- [x] ot-recorder-arm
- [x] piknik
- [x] portia
- [x] pure-ftpd

27
ot-recorder/Dockerfile Normal file
View File

@ -0,0 +1,27 @@
#
# Dockerfile for ot-recorder
#
FROM debian:jessie
MAINTAINER EasyPi Software Foundation
RUN set -xe \
&& apt-get update \
&& apt-get install -y curl \
&& curl -sSL http://repo.owntracks.org/repo.owntracks.org.gpg.key | apt-key add - \
&& echo 'deb http://repo.owntracks.org/debian jessie main' > /etc/apt/sources.list.d/owntracks.list \
&& apt-get update \
&& apt-get install -y ot-recorder \
&& rm -rf /var/lib/apt/lists/*
ENV OTR_STORAGEDIR /var/spool/owntracks/recorder/store
ENV OTR_TOPICS owntracks/#
ENV OTR_HOST iot.eclipse.org
ENV OTR_PORT 1883
VOLUME $OTR_STORAGEDIR
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 8083

5
ot-recorder/README.md Normal file
View File

@ -0,0 +1,5 @@
ot-recorder
===========

View File

@ -0,0 +1,27 @@
#
# Dockerfile for ot-recorder-arm
#
FROM armhf/debian:jessie
MAINTAINER EasyPi Software Foundation
RUN set -xe \
&& apt-get update \
&& apt-get install -y curl \
&& curl -sSL http://repo.owntracks.org/repo.owntracks.org.gpg.key | apt-key add - \
&& echo 'deb http://repo.owntracks.org/debian jessie main' > /etc/apt/sources.list.d/owntracks.list \
&& apt-get update \
&& apt-get install -y ot-recorder \
&& rm -rf /var/lib/apt/lists/*
ENV OTR_STORAGEDIR /var/spool/owntracks/recorder/store
ENV OTR_TOPICS owntracks/#
ENV OTR_HOST iot.eclipse.org
ENV OTR_PORT 1883
VOLUME $OTR_STORAGEDIR
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 8083

View File

@ -0,0 +1,7 @@
ot-recorder:
image: easypi/ot-recorder-arm
ports:
- "8083:8083"
volumes:
- ./data:/var/spool/owntracks/recorder/store
restart: always

View File

@ -0,0 +1,14 @@
#!/bin/sh
set -xe
if ! [ -d $OTR_STORAGEDIR/last ]
then
echo "initializing ..."
ot-recorder --initialize
mkdir -p $OTR_STORAGEDIR/last
fi
chown -R owntracks:owntracks $OTR_STORAGEDIR
exec ot-recorder --http-host 0.0.0.0 $OTR_TOPICS

View File

@ -0,0 +1,7 @@
ot-recorder:
image: vimagick/ot-recorder
ports:
- "8083:8083"
volumes:
- ./data:/var/spool/owntracks/recorder/store
restart: always

View File

@ -0,0 +1,14 @@
#!/bin/sh
set -xe
if ! [ -d $OTR_STORAGEDIR/last ]
then
echo "initializing ..."
ot-recorder --initialize
mkdir -p $OTR_STORAGEDIR/last
fi
chown -R owntracks:owntracks $OTR_STORAGEDIR
exec ot-recorder --http-host 0.0.0.0 $OTR_TOPICS