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:
parent
e230f16705
commit
0c3b1f5abd
@ -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
27
ot-recorder/Dockerfile
Normal 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
5
ot-recorder/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
ot-recorder
|
||||
===========
|
||||
|
||||
|
||||
|
27
ot-recorder/arm/Dockerfile
Normal file
27
ot-recorder/arm/Dockerfile
Normal 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
|
7
ot-recorder/arm/docker-compose.yml
Normal file
7
ot-recorder/arm/docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
||||
ot-recorder:
|
||||
image: easypi/ot-recorder-arm
|
||||
ports:
|
||||
- "8083:8083"
|
||||
volumes:
|
||||
- ./data:/var/spool/owntracks/recorder/store
|
||||
restart: always
|
14
ot-recorder/arm/docker-entrypoint.sh
Executable file
14
ot-recorder/arm/docker-entrypoint.sh
Executable 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
|
7
ot-recorder/docker-compose.yml
Normal file
7
ot-recorder/docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
||||
ot-recorder:
|
||||
image: vimagick/ot-recorder
|
||||
ports:
|
||||
- "8083:8083"
|
||||
volumes:
|
||||
- ./data:/var/spool/owntracks/recorder/store
|
||||
restart: always
|
14
ot-recorder/docker-entrypoint.sh
Executable file
14
ot-recorder/docker-entrypoint.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user