mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-22 06:23:01 +00:00
[build] Tweak database task
This commit is contained in:
parent
fc0307a5e0
commit
675c2afbaa
2 changed files with 7 additions and 2 deletions
8
build
8
build
|
@ -18,6 +18,9 @@ lantern_path="./lantern-build-engine";
|
|||
# Put any custom settings here.
|
||||
build_output_folder="./app";
|
||||
|
||||
database_host="db.connectedhumber.org";
|
||||
database_name="aq_db";
|
||||
|
||||
###############################################################################
|
||||
|
||||
# Check out the lantern git submodule if needed
|
||||
|
@ -92,9 +95,10 @@ function task_setup-dev {
|
|||
function task_database {
|
||||
task_begin "Connecting to the database";
|
||||
|
||||
ssh -TN db.connectedhumber.org -L 3306:localhost:3306 &
|
||||
ssh -TN "${database_host}" -L 3306:localhost:3306 &
|
||||
ssh_pid=$!;
|
||||
mysql --host localhost --port 3306 -u "${USER}" -p;
|
||||
sleep 1;
|
||||
mysql --host 127.0.0.1 --port 3306 --database "${database_name}" --user "${USER}" --password;
|
||||
|
||||
kill $!; wait; sleep 0.5;
|
||||
task_end $?;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
# Settings that control the database, or the connection to it
|
||||
|
||||
type = "mysql" # MariaDB. MySQL servers might work too, but no promises.
|
||||
|
||||
username = "user"
|
||||
password = "Define_in_custom_config_file"
|
||||
|
||||
|
|
Loading…
Reference in a new issue