From 27cc7693dc28ac243944bf6a2b722668d3931a82 Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Mon, 11 Sep 2023 12:12:49 +0200 Subject: [PATCH] Disable umami and next.js telemetry. --- conf/.env | 2 +- conf/systemd.service | 3 ++- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/conf/.env b/conf/.env index e2d7381..865c609 100644 --- a/conf/.env +++ b/conf/.env @@ -1,5 +1,5 @@ DATABASE_TYPE=postgresql DATABASE_URL=postgresql://__DB_USER__:__DB_PWD__@127.0.0.1:5432/__DB_NAME__ -DISABLE_TELEMETRY=0 +DISABLE_TELEMETRY=1 PORT=__PORT__ DEFAULT_LOCALE="__LANGUAGE__" diff --git a/conf/systemd.service b/conf/systemd.service index cb2ee0d..3606d61 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,8 +7,9 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -#Environment=NODE_ENV=production +Environment=NODE_ENV=production Environment="__YNH_NODE_LOAD_PATH__" +Environment=NEXT_TELEMETRY_DISABLED=1 ExecStart=__YNH_NPM__ run start-env # Sandboxing options to harden security diff --git a/scripts/install b/scripts/install index 6d4e23c..91403ca 100755 --- a/scripts/install +++ b/scripts/install @@ -59,7 +59,7 @@ ynh_script_progression --message="Configuring the app..." --weight=15 pushd $install_dir ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn build + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NEXT_TELEMETRY_DISABLED=1 yarn build popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index af90e8c..ab27cd3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -91,7 +91,7 @@ ynh_script_progression --message="Configuring the app..." --weight=15 pushd $install_dir ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn build + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NEXT_TELEMETRY_DISABLED=1 yarn build #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH npx @umami/migrate-v1-v2@latest popd