From a489492a4985329bdb328dadc56f6e821401cadf Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 8 May 2021 15:44:58 +0200 Subject: [PATCH] fix --- conf/.sequelizerc.example | 12 +++++++----- scripts/install | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/conf/.sequelizerc.example b/conf/.sequelizerc.example index ddb5cba..9b42bbf 100644 --- a/conf/.sequelizerc.example +++ b/conf/.sequelizerc.example @@ -1,8 +1,10 @@ -var path = require('path'); +const path = require('path') +const config = require('./lib/config') module.exports = { - 'config': path.resolve('config.json'), - 'migrations-path': path.resolve('lib', 'migrations'), - 'models-path': path.resolve('lib', 'models'), - 'url': 'postgres://__DB_NAME__:__DB_PWD__@localhost:5432/__DB_NAME__' + config: path.resolve('config.js'), + 'migrations-path': path.resolve('lib', 'migrations'), + 'models-path': path.resolve('lib', 'models'), + url: 'postgres://__DB_NAME__:__DB_PWD__@localhost:5432/__DB_NAME__' } + diff --git a/scripts/install b/scripts/install index 62dd788..88d047d 100644 --- a/scripts/install +++ b/scripts/install @@ -112,10 +112,12 @@ ynh_add_nginx_config #============================================== ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=24 +chown -R $app: $final_path + pushd "$final_path" || ynh_die ynh_use_nodejs ynh_exec_warn_less bin/setup - ynh_exec_warn_less ynh_npm run build + ynh_exec_as $app env $ynh_node_load_PATH npm run build popd || ynh_die #=================================================