initial
This commit is contained in:
commit
1358be1157
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*~
|
||||
.*~
|
21
.gitlab-ci.yml
Normal file
21
.gitlab-ci.yml
Normal 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
24
Dockerfile
Normal 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 ]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user