From 0d9960357c8850635f1b9d8c00e814100ada2f25 Mon Sep 17 00:00:00 2001 From: Kakious Date: Wed, 27 Sep 2023 14:24:02 -0400 Subject: [PATCH] chore: working on configuration for fox api and boop --- configs/boop/example.env | 0 configs/fox-api/configuration.php | 84 +++++++++++++++++++++++++++++++ scripts/fox-api/bootstrap-php.sh | 20 +++++++- 3 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 configs/boop/example.env create mode 100644 configs/fox-api/configuration.php diff --git a/configs/boop/example.env b/configs/boop/example.env new file mode 100644 index 0000000..e69de29 diff --git a/configs/fox-api/configuration.php b/configs/fox-api/configuration.php new file mode 100644 index 0000000..b185743 --- /dev/null +++ b/configs/fox-api/configuration.php @@ -0,0 +1,84 @@ + /home/coder/fox-api/.dbpass +mysqladmin -u root password $password 2>&1 | grep -v "Warning" +mysql -u root -p$password -e "CREATE USER 'fox_api'@'%' IDENTIFIED BY '$password';" 2>&1 | grep -v "Warning" +mysql -u root -p$password -e "GRANT ALL PRIVILEGES ON fox_api.* TO 'fox_api'@'%';" 2>&1 | grep -v "Warning" +mysql -u root -p$password -e "FLUSH PRIVILEGES;" 2>&1 | grep -v "Warning" +chown coder:coder /home/coder/fox-api/.dbpass + +echo "[BOOTSTRAP] DB Configured, setting up .env file..." + +# read /home/coder/.coder-env as they contain the workspace name and username +