From 2cb77bb432f0c3be8a15fe67369e1cf57c4b851f Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:09:53 +0100 Subject: [PATCH] cleanup --- conf/production.json | 24 ++++++++++++++++++++++++ scripts/change_url | 2 +- scripts/install | 3 ++- scripts/restore | 2 +- scripts/upgrade | 2 +- 5 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 conf/production.json diff --git a/conf/production.json b/conf/production.json new file mode 100644 index 0000000..d66b56a --- /dev/null +++ b/conf/production.json @@ -0,0 +1,24 @@ +{ + "persistor": { + "backend": "fs", + "useSubdirectories": true + }, + "basicHttpAuth": { + "password": "password" + }, + "useDeleteObjects": "false", + "jwtAuth": { + "algorithm": "HS256" + }, + "mongo": {}, + "blobStore": { + "globalBucket": "__DATA_DIR__/history/overleaf-global-blobs", + "projectBucket": "__DATA_DIR__/history/overleaf-project-blobs" + }, + "chunkStore": { + "bucket": "__DATA_DIR__/history/overleaf-chunks" + }, + "zipStore": { + "bucket": "__DATA_DIR__/history/overleaf-zips" + } + } \ No newline at end of file diff --git a/scripts/change_url b/scripts/change_url index 397a720..03ad64b 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -67,7 +67,7 @@ ynh_systemd_action --service_name="$app-contacts" --action="start" --log_path="/ ynh_systemd_action --service_name="$app-docstore" --action="start" --log_path="/var/log/$app/docstore.log" --line_match="Using settings from" ynh_systemd_action --service_name="$app-document-updater" --action="start" --log_path="/var/log/$app/document-updater.log" --line_match="Using settings from" ynh_systemd_action --service_name="$app-filestore" --action="start" --log_path="/var/log/$app/filestore.log" --line_match="Using settings from" -ynh_systemd_action --service_name="$app-history-v1" --action="start" --log_path="/var/log/$app/history-v1.log" --line_match="Using settings from" +ynh_systemd_action --service_name="$app-history-v1" --action="start" --log_path="/var/log/$app/history-v1.log" --line_match="Loading backend" ynh_systemd_action --service_name="$app-notifications" --action="start" --log_path="/var/log/$app/notifications.log" --line_match="Using settings from" ynh_systemd_action --service_name="$app-project-history" --action="start" --log_path="/var/log/$app/project-history.log" --line_match="Using settings from" ynh_systemd_action --service_name="$app-real-time" --action="start" --log_path="/var/log/$app/real-time.log" --line_match="Using settings from" diff --git a/scripts/install b/scripts/install index 26fd84c..06be53f 100755 --- a/scripts/install +++ b/scripts/install @@ -103,7 +103,8 @@ cp -r "$install_dir/build/patches/" "$install_dir/live/patches/" cp -r "$install_dir/build/server-ce/config" "$install_dir/config/" ynh_secure_remove --file="$install_dir/config/settings.js" -cp "$install_dir/build/server-ce/config/production.json" "$install_dir/live/services/history-v1/config/" +ynh_add_config --template="../conf/production.json" --destination="$install_dir/build/server-ce/config/production.json" +ynh_add_config --template="../conf/production.json" --destination="$install_dir/live/services/history-v1/config/production.json" cp "$install_dir/build/server-ce/config/custom-environment-variables.json" "$install_dir/live/services/history-v1/config/" diff --git a/scripts/restore b/scripts/restore index 4333b0d..0db3f83 100755 --- a/scripts/restore +++ b/scripts/restore @@ -151,7 +151,7 @@ ynh_systemd_action --service_name="$app-contacts" --action="start" --log_path="/ ynh_systemd_action --service_name="$app-docstore" --action="start" --log_path="/var/log/$app/docstore.log" --line_match="Using settings from" ynh_systemd_action --service_name="$app-document-updater" --action="start" --log_path="/var/log/$app/document-updater.log" --line_match="Using settings from" ynh_systemd_action --service_name="$app-filestore" --action="start" --log_path="/var/log/$app/filestore.log" --line_match="Using settings from" -ynh_systemd_action --service_name="$app-history-v1" --action="start" --log_path="/var/log/$app/history-v1.log" --line_match="Using settings from" +ynh_systemd_action --service_name="$app-history-v1" --action="start" --log_path="/var/log/$app/history-v1.log" --line_match="Loading backend" ynh_systemd_action --service_name="$app-notifications" --action="start" --log_path="/var/log/$app/notifications.log" --line_match="Using settings from" ynh_systemd_action --service_name="$app-project-history" --action="start" --log_path="/var/log/$app/project-history.log" --line_match="Using settings from" ynh_systemd_action --service_name="$app-real-time" --action="start" --log_path="/var/log/$app/real-time.log" --line_match="Using settings from" diff --git a/scripts/upgrade b/scripts/upgrade index 7b6df54..a8c6138 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -217,7 +217,7 @@ ynh_systemd_action --service_name="$app-contacts" --action="start" --log_path="/ ynh_systemd_action --service_name="$app-docstore" --action="start" --log_path="/var/log/$app/docstore.log" --line_match="Using settings from" ynh_systemd_action --service_name="$app-document-updater" --action="start" --log_path="/var/log/$app/document-updater.log" --line_match="Using settings from" ynh_systemd_action --service_name="$app-filestore" --action="start" --log_path="/var/log/$app/filestore.log" --line_match="Using settings from" -ynh_systemd_action --service_name="$app-history-v1" --action="start" --log_path="/var/log/$app/history-v1.log" --line_match="Using settings from" +ynh_systemd_action --service_name="$app-history-v1" --action="start" --log_path="/var/log/$app/history-v1.log" --line_match="Loading backend" ynh_systemd_action --service_name="$app-notifications" --action="start" --log_path="/var/log/$app/notifications.log" --line_match="Using settings from" ynh_systemd_action --service_name="$app-project-history" --action="start" --log_path="/var/log/$app/project-history.log" --line_match="Using settings from" ynh_systemd_action --service_name="$app-real-time" --action="start" --log_path="/var/log/$app/real-time.log" --line_match="Using settings from"