From 0f3624de4cb23a24a5a698db859b3677ca7f01ad Mon Sep 17 00:00:00 2001 From: frju365 Date: Wed, 21 Nov 2018 19:44:50 +0100 Subject: [PATCH 1/2] Create .sequelizerc.example --- conf/.sequelizerc.example | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 conf/.sequelizerc.example diff --git a/conf/.sequelizerc.example b/conf/.sequelizerc.example new file mode 100644 index 0000000..1f7606c --- /dev/null +++ b/conf/.sequelizerc.example @@ -0,0 +1,9 @@ + +var path = require('path'); + +module.exports = { + 'config': path.resolve('config.json'), + 'migrations-path': path.resolve('lib', 'migrations'), + 'models-path': path.resolve('lib', 'models'), + 'url': 'postgres://__DB_USER__:__DB_PASS__@localhost:5432/__DB_NAME__' +} From 3983fbd773d4670f0b7f0039549e5578e80115f6 Mon Sep 17 00:00:00 2001 From: frju365 Date: Wed, 21 Nov 2018 19:47:56 +0100 Subject: [PATCH 2/2] try something... --- scripts/install | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index a77e8c4..bc428c4 100644 --- a/scripts/install +++ b/scripts/install @@ -119,18 +119,27 @@ ynh_setup_source "$final_path" # MODIFY A CONFIG FILE #================================================= -#cp -a ../conf/onlyoffice-documentserver.conf /etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf +# Main config File ynh_replace_string "__DB_USER__" "$db_user" "../conf/config.json.exemple" ynh_replace_string "__DB_NAME__" "$db_name" "../conf/config.json.exemple" ynh_replace_string "__DB_PASS__" "$db_pass" "../conf/config.json.exemple" cp ../conf/config.json.exemple $final_path/config.json +# DB Config File +ynh_replace_string "__DB_USER__" "$db_user" "../conf/.sequelizerc.example" +ynh_replace_string "__DB_NAME__" "$db_name" "../conf/.sequelizerc.example" +ynh_replace_string "__DB_PASS__" "$db_pass" "../conf/.sequelizerc.example" +cp ../conf/.sequelizerc.example $final_path/.sequelizerc + #============================================== # INSTALL CODIMD #============================================== pushd $final_path -bin/setup +npm install +npm run build +node_modules/.bin/sequelize db:migrate +popd #================================================= # NGINX CONFIGURATION