1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:31 +02:00

add ot-frontend-arm

This commit is contained in:
kev 2019-10-15 09:23:44 +08:00
parent fae578be4d
commit 3a923786cc
3 changed files with 68 additions and 16 deletions

View File

@ -98,6 +98,7 @@ A collection of delicious docker recipes.
- [x] nullmailer-arm - [x] nullmailer-arm
- [x] openhab - [x] openhab
- [x] openssh - [x] openssh
- [x] ot-frontend-arm
- [x] ot-recorder - [x] ot-recorder
- [x] ot-recorder-arm - [x] ot-recorder-arm
- [x] piknik - [x] piknik

View File

@ -0,0 +1,38 @@
#
# Dockerfile for ot-frontend-arm
#
FROM arm32v7/alpine:3
MAINTAINER EasyPi Software Foundation
RUN set -xe \
&& apk add --no-cache gettext \
&& mv /usr/bin/envsubst /tmp/ \
&& runDeps="$( \
scanelf --needed --nobanner /tmp/envsubst \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u \
)" \
&& apk add --no-cache $runDeps \
&& apk del gettext
RUN set -xe \
&& apk add --no-cache curl nginx \
&& mv /tmp/envsubst /usr/local/bin/ \
&& curl -sSLO https://github.com/owntracks/frontend/archive/master.tar.gz \
&& mkdir -p /usr/share/nginx/html/ \
&& tar xzf master.tar.gz --strip-components=1 -C /usr/share/nginx/html/ frontend-master/index.html frontend-master/static \
&& tar xzf master.tar.gz --strip-components=1 -C /etc/nginx/ frontend-master/nginx.tmpl \
&& rm master.tar.gz
ENV LISTEN_PORT=80
ENV SERVER_HOST=otrecorder
ENV SERVER_PORT=8083
EXPOSE 80
CMD set -xe \
&& envsubst '${SERVER_HOST}:${SERVER_PORT}' < /etc/nginx/nginx.tmpl > /etc/nginx/nginx.conf \
&& nginx -g 'daemon off;'

View File

@ -1,16 +1,29 @@
ot-recorder: version: "3.7"
image: easypi/ot-recorder-arm
ports: services:
- "8083:8083"
volumes: recorder:
- ./data:/var/spool/owntracks/recorder/store image: easypi/ot-recorder-arm
environment: ports:
- OTR_HOST=iot.eclipse.org - "8083:8083"
- OTR_PORT=8883 volumes:
- OTR_USER=username - ./data:/var/spool/owntracks/recorder/store
- OTR_PASS=password environment:
- OTR_CAFILE=/etc/ssl/certs/DST_Root_CA_X3.pem - OTR_HOST=iot.eclipse.org
- OTR_TOPICS=owntracks/# - OTR_PORT=8883
# OTR_BROWSERAPIKEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - OTR_USER=username
# OTR_OPTIONS=--debug - OTR_PASS=password
restart: always - OTR_TOPICS=owntracks/#
# OTR_CAFILE=/etc/ssl/certs/DST_Root_CA_X3.pem
# 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