From 486298d65916324a6442182a15d8dd848845525c Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Mon, 5 Jul 2021 20:50:52 +0200 Subject: [PATCH] Fix install issues --- conf/env_auth-worker.env.sample | 10 +++++----- conf/env_auth.env.sample | 10 +++++----- scripts/install | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/conf/env_auth-worker.env.sample b/conf/env_auth-worker.env.sample index a8de7f2..feaa7ad 100644 --- a/conf/env_auth-worker.env.sample +++ b/conf/env_auth-worker.env.sample @@ -14,12 +14,12 @@ ENCRYPTION_SERVER_KEY=__ENCRYPTION_SERVER_KEY__ PORT="__PORT_AUTH_WORKER__" -DB_HOST=127.0.0.1 -DB_REPLICA_HOST=127.0.0.1 +DB_HOST=localhost +DB_REPLICA_HOST=localhost DB_PORT=3306 -DB_USERNAME=auth -DB_PASSWORD=changeme123 -DB_DATABASE=auth +DB_USERNAME=__DB_USER__ +DB_PASSWORD=__DB_PWD__ +DB_DATABASE=__DB_NAME__ DB_DEBUG_LEVEL=all # "all" | "query" | "schema" | "error" | "warn" | "info" | "log" | "migration" DB_MIGRATIONS_PATH=dist/migrations/*.js diff --git a/conf/env_auth.env.sample b/conf/env_auth.env.sample index 8eab6b0..d90dc5c 100644 --- a/conf/env_auth.env.sample +++ b/conf/env_auth.env.sample @@ -14,12 +14,12 @@ ENCRYPTION_SERVER_KEY=__ENCRYPTION_SERVER_KEY__ PORT="__PORT_AUTH__" -DB_HOST=127.0.0.1 -DB_REPLICA_HOST=127.0.0.1 +DB_HOST=localhost +DB_REPLICA_HOST=localhost DB_PORT=3306 -DB_USERNAME=auth -DB_PASSWORD=changeme123 -DB_DATABASE=auth +DB_USERNAME=__DB_USER__ +DB_PASSWORD=__DB_PWD__ +DB_DATABASE=__DB_NAME__ DB_DEBUG_LEVEL=all # "all" | "query" | "schema" | "error" | "warn" | "info" | "log" | "migration" DB_MIGRATIONS_PATH=dist/migrations/*.js diff --git a/scripts/install b/scripts/install index 7d5b2cf..5dc1d2b 100755 --- a/scripts/install +++ b/scripts/install @@ -151,7 +151,7 @@ jwt_secret=$(ynh_string_random --length=48 | base64) legacy_jwt_secret=$(ynh_string_random --length=48 | base64) auth_jwt_secret=$(ynh_string_random --length=48 | base64) pseudo_key_params_key=$(ynh_string_random --length=48 | base64) -encryption_server_key=$(ynh_string_random --length=64 | base64) +encryption_server_key=$(hexdump -n 32 -e '4/4 "%08X" 1 "\n"' /dev/random) # 32bytes hex key is required ynh_app_setting_set --app=$app --key=jwt_secret --value=$jwt_secret ynh_app_setting_set --app=$app --key=legacy_jwt_secret --value=$legacy_jwt_secret @@ -236,11 +236,11 @@ popd ynh_script_progression --message="Configuring a systemd service..." --weight=4 # Create a dedicated systemd config -ynh_add_systemd_config --service="$app-syncing-server-js" --template="systemd_syncing-server-js" -ynh_add_systemd_config --service="$app-syncing-server-js-worker" --template="systemd_syncing-server-js-worker" -ynh_add_systemd_config --service="$app-auth" --template="systemd_auth" -ynh_add_systemd_config --service="$app-auth-worker" --template="systemd_auth-worker" -ynh_add_systemd_config --service="$app-api-gateway" --template="systemd_api-gateway" +ynh_add_systemd_config --service="$app-syncing-server-js" --template="systemd_syncing-server-js.service" +ynh_add_systemd_config --service="$app-syncing-server-js-worker" --template="systemd_syncing-server-js-worker.service" +ynh_add_systemd_config --service="$app-auth" --template="systemd_auth.service" +ynh_add_systemd_config --service="$app-auth-worker" --template="systemd_auth-worker.service" +ynh_add_systemd_config --service="$app-api-gateway" --template="systemd_api-gateway.service" #================================================= # STORE THE CONFIG FILE CHECKSUM