1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-21 01:27:01 +02:00
This commit is contained in:
kevin 2023-12-29 09:14:38 +08:00
parent 14ab509418
commit f7cf0846a1
5 changed files with 57 additions and 0 deletions

View File

@ -500,6 +500,7 @@ A collection of delicious docker recipes.
- [x] yourls
- [x] ghcr.io/linuxserver/wireguard
- [x] apache/zeppelin
- [x] koenkk/zigbee2mqtt
- [x] zookeeper
- [x] elkozmon/zoonavigator

20
semaphore/keygen.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
#
# https://docs.semui.co/administration-guide/api
#
set -euo pipefail
API_ENDPOINT=http://192.168.1.100:3000
API_USERNAME=username
API_PASSWORD=password
cookie=$(jq -n --arg auth $API_USERNAME --arg password $API_PASSWORD '{$auth, $password}' | curl -s -c- $API_ENDPOINT/api/auth/login -d @- -o /dev/null | awk '$6=="semaphore"{print $7}')
if curl -s -H "Cookie: semaphore=$cookie" $API_ENDPOINT/api/user/tokens | jq -e 'length==0' > /dev/null; then
curl -s -X POST -H "Cookie: semaphore=$cookie" $API_ENDPOINT/api/user/tokens
fi
token=$(curl -s -H "Cookie: semaphore=$cookie" $API_ENDPOINT/api/user/tokens | jq -r .[0].id)
curl -s -H "Authorization: Bearer $token" $API_ENDPOINT/api/user/tokens | jq .

2
zigbee2mqtt/README.md Normal file
View File

@ -0,0 +1,2 @@
zigbee2mqtt
===========

View File

@ -0,0 +1,20 @@
# Home Assistant integration (MQTT discovery)
homeassistant: false
# allow new devices to join
permit_join: false
# MQTT settings
mqtt:
# MQTT base topic for zigbee2mqtt MQTT messages
base_topic: zigbee2mqtt
# MQTT server URL
server: 'mqtt://localhost'
# MQTT server authentication, uncomment if required:
# user: my_user
# password: my_password
# Serial settings
serial:
# Location of CC2531 USB sniffer
port: /dev/ttyACM0

View File

@ -0,0 +1,14 @@
version: "3.8"
services:
zigbee2mqtt:
image: koenkk/zigbee2mqtt
ports:
- "8080:8080"
volumes:
- ./data:/app/data
- /run/udev:/run/udev:ro
environment:
- TZ=Asia/Shanghai
devices:
- /dev/serial/by-id/usb-Texas_Instruments_XXXXXX:/dev/ttyACM0
restart: unless-stopped