This commit is contained in:
Wolfgang Hottgenroth 2019-06-27 13:30:52 +02:00
commit 1358be1157
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F
4 changed files with 48 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*~
.*~

21
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,21 @@
image: docker:stable
stages:
- build
variables:
IMAGE_NAME: registry.gitlab.com/wolutator/hkd
build:
stage: build
tags:
- hottis
- linux
- docker
script:
- VERSION=`cat VERSION`
- docker build --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION .
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker push $IMAGE_NAME:latest
- docker push $IMAGE_NAME:$VERSION

24
Dockerfile Normal file
View File

@ -0,0 +1,24 @@
FROM node:8
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
LABEL ImageName="registry.gitlab.com/wolutator/hkd"
ARG PIN="031-45-154"
ARG BROKER="mqtt://127.0.0.1"
ARG DATA_DIR="/opt/app"
ARG STORAGE_DIR="/opt/app/storage"
RUN \
node install -g homekit2mqtt --unsafe-perm && \
mkdir -p ${DATA_DIR} && \
touch ${DATA_DIR}/mapping.json && \
mkdir -p ${STORAGE_DIR}
VOLUME ${DATA_DIR}
EXPOSE 51826
EXPOSE 51888
CMD [ "homekit2mqtt", "-m", ${DATA_DIR}"/mapping.json", "-u", ${BROKER}, "-s" ${STORAGE_DIR}, "--insecure", "-c", $PIN ]

1
VERSION Normal file
View File

@ -0,0 +1 @@
0.1