From efc76cea6dcef1b432f289fe12b4c700cb4e1dd4 Mon Sep 17 00:00:00 2001 From: Florent Date: Sun, 3 Mar 2024 16:06:18 +0100 Subject: [PATCH] Fix installation --- conf/systemd.service | 10 ++-------- doc/POST_INSTALL.md | 9 ++++----- scripts/install | 3 ++- scripts/upgrade | 7 ++++--- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index b73e479..541af5e 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,14 +7,8 @@ Type=simple User=__APP__ Group=__APP__ -Environment="APP_BASE_URL=https://__DOMAIN__" -Environment="APP_PORT=__PORT__" -Environment="DB_CLIENT=pg" -Environment="POSTGRES_PASSWORD=__DB_PWD__" -Environment="POSTGRES_DATABASE=__DB_NAME__" -Environment="POSTGRES_USER=__DB_USER__" -Environment="POSTGRES_PORT=5432" -Environment="POSTGRES_HOST=localhost" +Environment="__YNH_NODE_LOAD_PATH__" +EnvironmentFile=__INSTALL_DIR__/.env WorkingDirectory=__INSTALL_DIR__/ ExecStart=/usr/bin/yarn __INSTALL_DIR__/packages/server start diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 17a83d3..f3db3c7 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,9 +1,8 @@ Now login to Joplin + - Url: https://__DOMAIN____PATH__ + - Email: __ADMIN_MAIL__ + - Password: __ADMIN_PASS__ -- Url: https://**DOMAIN\_\_**PATH\_\_ -- Email: **ADMIN_MAIL** -- Password: **ADMIN_PASS** - -Then you may change the default password at this page: https://**DOMAIN\_\_**PATH\_\_/admin/users +Then you may change the default password at this page: https://__DOMAIN____PATH__/admin/users Then download one of these Joplin apps and configure the synchronisation with your server: https://joplinapp.org/help/install/ diff --git a/scripts/install b/scripts/install index 2b8266c..d08adcf 100755 --- a/scripts/install +++ b/scripts/install @@ -67,9 +67,10 @@ chown $app:$app "$install_dir/.env" #================================================= ynh_script_progression --message="Building $app..." --weight=10 -pushd $install_dir +pushd $install_dir/packages/server ynh_use_nodejs sudo -u $app env $ynh_node_load_PATH BUILD_SEQUENCIAL=1 yarn install --inline-builds + sudo -u $app env $ynh_node_load_PATH yarn build sudo -u $app env $ynh_node_load_PATH yarn cache clean ynh_secure_remove .yarn/berry popd diff --git a/scripts/upgrade b/scripts/upgrade index 972aea2..57185a6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,11 +49,12 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Building $app..." --weight=10 - pushd $install_dir + pushd $install_dir/packages/server ynh_use_nodejs sudo -u $app env $ynh_node_load_PATH BUILD_SEQUENCIAL=1 yarn install --inline-builds - # sudo -u $app env $ynh_node_load_PATH yarn cache clean - # ynh_secure_remove .yarn/berry + sudo -u $app env $ynh_node_load_PATH yarn build + sudo -u $app env $ynh_node_load_PATH yarn cache clean + ynh_secure_remove .yarn/berry popd fi