From fcf00c0880bfc5e7d622c98380776c9c03808d53 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 1 Jul 2022 22:50:08 +0200 Subject: [PATCH] Update 99-run.sh --- tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh b/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh index 727938ab2..0c1c8384d 100644 --- a/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh +++ b/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh @@ -50,6 +50,13 @@ case $(bashio::config 'DB_TYPE') in # Install mysqlclient pip install pymysql &>/dev/null +export DB_ENGINE=django.db.backends.mysql +export POSTGRES_HOST=$(bashio::services "mysql" "host") && bashio::log.blue "POSTGRES_HOST=$POSTGRES_HOST" +export POSTGRES_PORT=$(bashio::services "mysql" "port") && bashio::log.blue "POSTGRES_PORT=$POSTGRES_PORT" +export POSTGRES_USER=$(bashio::services "mysql" "username") && bashio::log.blue "POSTGRES_USER=$POSTGRES_USER" +export POSTGRES_PASSWORD=$(bashio::services "mysql" "password") && bashio::log.blue "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" +export POSTGRES_DB="tandoor" && bashio::log.blue "POSTGRES_DB=tandoor" + # Use values sed -i "1a export DB_ENGINE=django.db.backends.mysql" /opt/recipes/boot.sh sed -i "1a export POSTGRES_HOST=$(bashio::services "mysql" "host")" /opt/recipes/boot.sh && bashio::log.blue "POSTGRES_HOST=$POSTGRES_HOST"