WIP on home assistant

This commit is contained in:
Florent Guiotte 2024-01-29 23:34:32 +01:00
parent 2b84b5afdd
commit 499186556b
2 changed files with 57 additions and 0 deletions

View File

@ -268,6 +268,37 @@ services:
- hedgedoc-db-pw
homeassistant:
image: lscr.io/linuxserver/homeassistant:latest
container_name: homeassistant
#network_mode: host
environment:
<<: *common-environment
volumes:
- homeassistant-config:/config
ports:
- 8123:8123 #optional
#devices:
# - /path/to/device:/path/to/device #optional
restart: unless-stopped
yee0:
build: ssh
container_name: yee0
volumes:
- ./ssh/id_rsa:/root/.ssh/id_rsa
environment:
- SSH_HOSTNAME=192.168.1.5
- SSH_USERNAME=alarm
- SSH_LOCAL_PORT=55443
- SSH_DESTINATION=10.0.0.130
- SSH_DESTINATION_PORT=55443
#ports:
# - 55443:55443
restart: unless-stopped
volumes:
money-data:
zotero-data:
@ -283,6 +314,7 @@ volumes:
ddclient-cache:
hedgedoc-config:
hedgedoc-db:
homeassistant-config:
secrets:

25
ssh/Dockerfile Normal file
View File

@ -0,0 +1,25 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.18
# Install SSH client
RUN \
apk add --no-cache \
openssh-client
# Set volume for ssh key
VOLUME /root/.ssh/id_rsa
# Set default values for SSH tunnel configuration
ENV SSH_HOSTNAME=server.example.com
ENV SSH_USERNAME=username
ENV SSH_DESTINATION=destination
ENV SSH_DESTINATION_PORT=12345
ENV SSH_LOCAL_PORT=12345
ENTRYPOINT ssh \
-N -4 \
-L *:$SSH_LOCAL_PORT:$SSH_DESTINATION:$SSH_DESTINATION_PORT \
-l $SSH_USERNAME \
-o "StrictHostKeyChecking no" \
-o "UserKnownHostsFile /dev/null" \
$SSH_HOSTNAME