From 309e63fec0d6657d8a366be4d605f19d29e10a2a Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sun, 10 Nov 2019 21:29:03 +0200 Subject: [PATCH] Added mariadb Signed-off-by: Marko Korhonen --- homeautomation/docker-compose.yml | 9 +++++++++ homeautomation/init.sh | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/homeautomation/docker-compose.yml b/homeautomation/docker-compose.yml index 8cfc71d..a73e981 100644 --- a/homeautomation/docker-compose.yml +++ b/homeautomation/docker-compose.yml @@ -73,3 +73,12 @@ services: - /homeautomation-config/snips/log/:/var/log - /homeautomation-config/snips/snips.toml:/etc/snips.toml - /homeautomation-config/snips/assistant:/usr/share/snips + + mariadb: + container_name: snips + image: mariadb + restart: always + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} + ports: + - '3308:3306' diff --git a/homeautomation/init.sh b/homeautomation/init.sh index df0e320..8b90941 100755 --- a/homeautomation/init.sh +++ b/homeautomation/init.sh @@ -4,9 +4,9 @@ sudo mkdir -p /homeautomation-config/node-red sudo chmod -R a+rw /homeautomation-config/node-red cat < .env -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-)" -DECONZ_VNC_PASSWORD="$(pass reekynet/docker-home-automation | rg 'DECONZ_VNC_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-) +DECONZ_VNC_PASSWORD=$(pass reekynet/docker-home-automation | rg 'DECONZ_VNC_PASSWORD' | cut -d' ' -f2-) ENV docker-compose up -d