From 17c10df1a53b4c99308ffd479c49cc53d6ba34e9 Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Mon, 28 Nov 2022 13:32:49 +0100 Subject: [PATCH] config.php and .drone.yml update --- .drone.yml | 2 +- Sources/php_script/script/config.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index ecdd483..7ba4a1b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -95,7 +95,7 @@ steps: CONTAINERNAME: mysql_location COMMAND: create # OVERWRITE: true - # PRIVATE: true + PRIVATE: true CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD: from_secret: db_root_password CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE: diff --git a/Sources/php_script/script/config.php b/Sources/php_script/script/config.php index 7c7aaa0..eefa9dd 100644 --- a/Sources/php_script/script/config.php +++ b/Sources/php_script/script/config.php @@ -3,9 +3,9 @@ function connection(): bool|int|mysqli { - $username = "root"; //Get the username + $username = $_ENV["USER"]; //Get the username $host = $_ENV["HOST"]; //Get the url of the database - $password = $_ENV["ROOT_PASSWORD"]; //Get the password for the user selected + $password = $_ENV["PASSWORD"]; //Get the password for the user selected $db_name = $_ENV["DATABASE"]; //Get the name of the database try { //Try to connect to the database