Rearrange docker stuff
Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
This commit is contained in:
parent
bc45d6f1d6
commit
a376294eb7
|
@ -7,7 +7,7 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
image: homeassistant/home-assistant
|
image: homeassistant/home-assistant
|
||||||
volumes:
|
volumes:
|
||||||
- /homeautomation-config/home-assistant:/config
|
- /docker/homeautomation/home-assistant:/config
|
||||||
network_mode: host
|
network_mode: host
|
||||||
depends_on:
|
depends_on:
|
||||||
- deconz
|
- deconz
|
||||||
|
@ -27,7 +27,7 @@ services:
|
||||||
network_mode: host
|
network_mode: host
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- /homeautomation-config/deconz:/root/.local/share/dresden-elektronik/deCONZ
|
- /docker/homeautomation/deconz:/root/.local/share/dresden-elektronik/deCONZ
|
||||||
devices:
|
devices:
|
||||||
- /dev/ttyACM0
|
- /dev/ttyACM0
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- '1880:1880'
|
- '1880:1880'
|
||||||
volumes:
|
volumes:
|
||||||
- /homeautomation-config/node-red:/data
|
- /docker/homeautomation/node-red:/data
|
||||||
depends_on:
|
depends_on:
|
||||||
- home-assistant
|
- home-assistant
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ services:
|
||||||
- '9000:9000'
|
- '9000:9000'
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- /homeautomation-config/portainer:/data
|
- /docker/homeautomation/portainer:/data
|
||||||
|
|
||||||
mosquitto:
|
mosquitto:
|
||||||
container_name: mosquitto
|
container_name: mosquitto
|
||||||
|
@ -60,7 +60,7 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
network_mode: host
|
network_mode: host
|
||||||
volumes:
|
volumes:
|
||||||
- /homeautomation-config/mosquitto:/mosquitto
|
- /docker/homeautomation/mosquitto:/mosquitto
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
container_name: mariadb
|
container_name: mariadb
|
||||||
|
@ -71,23 +71,4 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- '3308:3306'
|
- '3308:3306'
|
||||||
volumes:
|
volumes:
|
||||||
- /homeautomation-config/mariadb:/var/lib/mysql
|
- /docker/homeautomation/mariadb:/var/lib/mysql
|
||||||
|
|
||||||
almond:
|
|
||||||
container_name: almond
|
|
||||||
image: stanfordoval/almond-server:latest-portable
|
|
||||||
ports:
|
|
||||||
- '3006:3000'
|
|
||||||
volumes:
|
|
||||||
- /homeautomation-config/almond
|
|
||||||
# snips:
|
|
||||||
# container_name: snips
|
|
||||||
# image: reekymarko/snips
|
|
||||||
# restart: always
|
|
||||||
# environment:
|
|
||||||
# ENABLE_MQTT: 'no'
|
|
||||||
# ENABLE_HOTWORD_SERVICE: 'no'
|
|
||||||
# volumes:
|
|
||||||
# - /homeautomation-config/snips/log/:/var/log
|
|
||||||
# - /homeautomation-config/snips/snips.toml:/etc/snips.toml
|
|
||||||
# - /homeautomation-config/snips/assistant:/usr/share/snips
|
|
|
@ -1,8 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
sudo mkdir -p /homeautomation-config/node-red
|
|
||||||
sudo chmod -R a+rw /homeautomation-config/node-red
|
|
||||||
|
|
||||||
cat <<ENV > .env
|
cat <<ENV > .env
|
||||||
MYSQL_ROOT_PASSWORD=$(pass reekynet/docker-home-automation | rg 'MYSQL_ROOT_PASSWORD' | cut -d' ' -f2-)
|
MYSQL_ROOT_PASSWORD=$(pass reekynet/docker-home-automation | rg 'MYSQL_ROOT_PASSWORD' | cut -d' ' -f2-)
|
||||||
HA_MYSQL_PASSWORD="$(pass reekynet/docker-home-automation | rg 'HA_MYSQL_PASSWORD' | cut -d' ' -f2-)
|
HA_MYSQL_PASSWORD="$(pass reekynet/docker-home-automation | rg 'HA_MYSQL_PASSWORD' | cut -d' ' -f2-)
|
|
@ -1,46 +0,0 @@
|
||||||
#version: 20181208_rc1
|
|
||||||
|
|
||||||
FROM debian:stretch-slim
|
|
||||||
|
|
||||||
#Change the timezone to your current timezone!!
|
|
||||||
ENV TZ=Europe/Helsinki
|
|
||||||
|
|
||||||
RUN set -x && \
|
|
||||||
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
||||||
|
|
||||||
RUN set -x && \
|
|
||||||
sed -i "s#deb http://deb.debian.org/debian stretch main#deb http://deb.debian.org/debian stretch main non-free#g" /etc/apt/sources.list && \
|
|
||||||
sed -i "s#deb http://security.debian.org/debian-security stretch/updates main#deb http://security.debian.org/debian-security stretch/updates main non-free#g" /etc/apt/sources.list && \
|
|
||||||
sed -i "s#deb http://deb.debian.org/debian stretch-updates main#deb http://deb.debian.org/debian stretch-updates main non-free#g" /etc/apt/sources.list
|
|
||||||
|
|
||||||
RUN set -x && \
|
|
||||||
apt-get update && apt-get dist-upgrade -y
|
|
||||||
|
|
||||||
RUN set -x && \
|
|
||||||
apt-get install -y dirmngr apt-transport-https
|
|
||||||
|
|
||||||
RUN set -x && \
|
|
||||||
bash -c 'echo "deb https://debian.snips.ai/stretch stable main" > /etc/apt/sources.list.d/snips.list'
|
|
||||||
|
|
||||||
RUN set -x && \
|
|
||||||
apt-key adv --keyserver pgp.mit.edu --recv-keys F727C778CCB0A455
|
|
||||||
|
|
||||||
RUN set -x && \
|
|
||||||
apt-get update
|
|
||||||
|
|
||||||
RUN set -x && \
|
|
||||||
apt-get install -y --allow-unauthenticated alsa-utils snips-platform-voice snips-skill-server curl unzip snips-template python-pip git
|
|
||||||
|
|
||||||
RUN set -x && \
|
|
||||||
pip install virtualenv
|
|
||||||
|
|
||||||
#Is this really required?
|
|
||||||
RUN set -x && \
|
|
||||||
usermod -aG snips-skills-admin root
|
|
||||||
|
|
||||||
COPY start-snips.sh start-snips.sh
|
|
||||||
|
|
||||||
EXPOSE 1883/tcp
|
|
||||||
|
|
||||||
|
|
||||||
CMD ["bash","/start-snips.sh"]
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
docker build -f Dockerfile.amd64 -t reekymarko/snips .
|
|
|
@ -1,84 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
#verify that environment variables have been passed to this container. set the default value if not.
|
|
||||||
ENABLE_MQTT=${ENABLE_MQTT:-yes}
|
|
||||||
ENABLE_HOTWORD_SERVICE=${ENABLE_HOTWORD_SERVICE:-yes}
|
|
||||||
|
|
||||||
|
|
||||||
#deploy apps (skills). See: https://snips.gitbook.io/documentation/console/deploying-your-skills
|
|
||||||
snips-template render
|
|
||||||
|
|
||||||
#goto skill directory
|
|
||||||
cd /var/lib/snips/skills
|
|
||||||
|
|
||||||
#start with a clear skill directory
|
|
||||||
rm -rf *
|
|
||||||
|
|
||||||
#download required skills from git
|
|
||||||
for url in $(awk '$1=="url:" {print $2}' /usr/share/snips/assistant/Snipsfile.yaml); do
|
|
||||||
git clone $url
|
|
||||||
done
|
|
||||||
|
|
||||||
#be shure we are still in the skill directory
|
|
||||||
cd /var/lib/snips/skills
|
|
||||||
|
|
||||||
#run setup.sh for each skill.
|
|
||||||
find . -maxdepth 1 -type d -print0 | while IFS= read -r -d '' dir; do
|
|
||||||
cd "$dir"
|
|
||||||
if [ -f setup.sh ]; then
|
|
||||||
echo "Run setup.sh in "$dir
|
|
||||||
#run the scrips always with bash
|
|
||||||
bash ./setup.sh
|
|
||||||
fi
|
|
||||||
cd /var/lib/snips/skills
|
|
||||||
done
|
|
||||||
|
|
||||||
#skill deployment is done
|
|
||||||
|
|
||||||
#go back to root directory
|
|
||||||
cd /
|
|
||||||
|
|
||||||
|
|
||||||
#start own mqtt service.
|
|
||||||
if [ $ENABLE_MQTT == yes ]; then
|
|
||||||
mosquitto -c /etc/mosquitto/mosquitto.conf -d
|
|
||||||
fi
|
|
||||||
|
|
||||||
#start Snips analytics service
|
|
||||||
snips-analytics 2> /var/log/snips-analytics.log &
|
|
||||||
snips_analytics_pid=$!
|
|
||||||
|
|
||||||
#start Snips' Automatic Speech Recognition service
|
|
||||||
snips-asr 2> /var/log/snips-asr.log &
|
|
||||||
snips_asr_pid=$!
|
|
||||||
|
|
||||||
#start Snips-dialogue service
|
|
||||||
snips-dialogue 2> /var/log/snips-dialogue.log &
|
|
||||||
snips_dialogue_pid=$!
|
|
||||||
|
|
||||||
#start Snips hotword service
|
|
||||||
|
|
||||||
if [ $ENABLE_HOTWORD_SERVICE == yes ]; then
|
|
||||||
snips-hotword 2> /var/log/snips-hotword.log &
|
|
||||||
snips_hotword_pid=$!
|
|
||||||
fi
|
|
||||||
|
|
||||||
#start Snips Natural Language Understanding service
|
|
||||||
snips-nlu 2> /var/log/snips-nlu.log &
|
|
||||||
snips_nlu_pid=$!
|
|
||||||
|
|
||||||
#start Snips Skill service
|
|
||||||
snips-skill-server 2> /var/log/snips-skill-server &
|
|
||||||
snips_skill_server_pid=$!
|
|
||||||
|
|
||||||
#start Snips TTS service
|
|
||||||
snips-tts 2> /var/log/snips-tts.log &
|
|
||||||
snips_tts_pid=$!
|
|
||||||
|
|
||||||
#start the snips audio server without playback and microphone
|
|
||||||
snips-audio-server --disable-playback --no-mike --hijack localhost:64321 2> /var/log/snips-audio-server.log &
|
|
||||||
snips_audio_server_pid=$!
|
|
||||||
|
|
||||||
wait "$snips_analytics_pid" "$snips_asr_pid" "$snips_dialogue_pid" "$snips_hotword_pid" "$snips_nlu_pid" "$snips_skill_server_pid" "$snips_audio_server_pid"
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ MODULES=(amdgpu)
|
||||||
BINARIES=()
|
BINARIES=()
|
||||||
FILES=()
|
FILES=()
|
||||||
{%@@ if profile == "Mirkwood" @@%}
|
{%@@ if profile == "Mirkwood" @@%}
|
||||||
HOOKS=(colors consolefont base udev autodetect modconf block filesystems keyboard btrfs welcomemessage encrypt resume fsck)
|
HOOKS=(base udev autodetect modconf block filesystems keyboard colors consolefont welcomemessage encrypt resume fsck)
|
||||||
{%@@ elif profile == "Rivendell" @@%}
|
{%@@ elif profile == "Rivendell" @@%}
|
||||||
HOOKS=(colors consolefont base udev autodetect modconf block filesystems keyboard fsck)
|
HOOKS=(colors consolefont base udev autodetect modconf block filesystems keyboard fsck)
|
||||||
{%@@ endif @@%}
|
{%@@ endif @@%}
|
||||||
|
|
Loading…
Reference in a new issue