Browse Source

[build] Tweak database task

pull/26/head
Starbeamrainbowlabs 4 years ago
parent
commit
675c2afbaa
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 8
      build
  2. 1
      settings.default.toml

8
build

@ -18,6 +18,9 @@ lantern_path="./lantern-build-engine"; @@ -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 { @@ -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 $?;

1
settings.default.toml

@ -7,6 +7,7 @@ @@ -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…
Cancel
Save