mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-23 01:39:27 +02:00
update owntracks
This commit is contained in:
parent
017cd00a78
commit
5f7c1a4688
@ -2,14 +2,14 @@
|
|||||||
# Dockerfile for ot-frontend-arm
|
# Dockerfile for ot-frontend-arm
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM arm32v7/node:10 AS build
|
FROM node:14 AS build
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
RUN curl -sSL https://github.com/owntracks/frontend/archive/master.tar.gz | tar xz --strip-components=1
|
RUN curl -sSL https://github.com/owntracks/frontend/archive/master.tar.gz | tar xz --strip-components=1
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
|
|
||||||
FROM arm32v7/nginx:alpine
|
FROM nginx:alpine
|
||||||
MAINTAINER EasyPi Software Foundation
|
MAINTAINER EasyPi Software Foundation
|
||||||
|
|
||||||
COPY --from=build /usr/src/app/dist /usr/share/nginx/html
|
COPY --from=build /usr/src/app/dist /usr/share/nginx/html
|
@ -1,29 +0,0 @@
|
|||||||
#
|
|
||||||
# Dockerfile for ot-recorder-arm
|
|
||||||
#
|
|
||||||
|
|
||||||
FROM arm32v7/debian:stretch
|
|
||||||
MAINTAINER EasyPi Software Foundation
|
|
||||||
|
|
||||||
RUN set -xe \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y curl gnupg \
|
|
||||||
&& curl -sSL http://repo.owntracks.org/repo.owntracks.org.gpg.key | apt-key add - \
|
|
||||||
&& echo 'deb http://repo.owntracks.org/debian stretch 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_HOST mqtt.eclipse.org
|
|
||||||
ENV OTR_PORT 1883
|
|
||||||
ENV OTR_HTTPHOST 0.0.0.0
|
|
||||||
ENV OTR_HTTPPORT 8083
|
|
||||||
ENV OTR_TOPICS owntracks/#
|
|
||||||
ENV OTR_STORAGEDIR /var/spool/owntracks/recorder/store
|
|
||||||
|
|
||||||
VOLUME $OTR_STORAGEDIR
|
|
||||||
|
|
||||||
COPY docker-entrypoint.sh /entrypoint.sh
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
||||||
|
|
||||||
EXPOSE 8083 8085
|
|
@ -1,30 +0,0 @@
|
|||||||
version: "3.8"
|
|
||||||
|
|
||||||
services:
|
|
||||||
|
|
||||||
recorder:
|
|
||||||
image: easypi/ot-recorder-arm
|
|
||||||
ports:
|
|
||||||
- "8083:8083"
|
|
||||||
- "8085:8085"
|
|
||||||
volumes:
|
|
||||||
- ./data:/var/spool/owntracks/recorder/store
|
|
||||||
environment:
|
|
||||||
- OTR_HOST=mqtt.eclipse.org
|
|
||||||
- OTR_PORT=8883
|
|
||||||
- OTR_USER=username
|
|
||||||
- OTR_PASS=password
|
|
||||||
- OTR_TOPICS=owntracks/#
|
|
||||||
- OTR_CAPATH=/etc/ssl/certs/
|
|
||||||
# OTR_OPTIONS=--debug
|
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
frontend:
|
|
||||||
image: easypi/ot-frontend-arm
|
|
||||||
ports:
|
|
||||||
- 8080:80
|
|
||||||
environment:
|
|
||||||
- LISTEN_PORT=80
|
|
||||||
- SERVER_HOST=recorder
|
|
||||||
- SERVER_PORT=8083
|
|
||||||
restart: unless-stopped
|
|
@ -1,13 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -xe
|
|
||||||
|
|
||||||
if ! [ -d $OTR_STORAGEDIR/last ]
|
|
||||||
then
|
|
||||||
echo "initializing ..."
|
|
||||||
mkdir -p $OTR_STORAGEDIR/last
|
|
||||||
chown -R owntracks:owntracks $OTR_STORAGEDIR
|
|
||||||
ot-recorder --initialize
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec ot-recorder --http-host $OTR_HTTPHOST --http-port $OTR_HTTPPORT $OTR_OPTIONS ${OTR_TOPICS:-owntracks/#}
|
|
Loading…
Reference in New Issue
Block a user