mirror of
https://github.com/YunoHost-Apps/codimd_ynh.git
synced 2024-09-03 18:16:32 +02:00
commit
eb84b78660
2 changed files with 20 additions and 2 deletions
9
conf/.sequelizerc.example
Normal file
9
conf/.sequelizerc.example
Normal file
|
@ -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__'
|
||||||
|
}
|
|
@ -119,19 +119,28 @@ ynh_setup_source "$final_path"
|
||||||
# MODIFY A CONFIG FILE
|
# 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_USER__" "$db_user" "../conf/config.json.exemple"
|
||||||
ynh_replace_string "__DB_NAME__" "$db_name" "../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"
|
ynh_replace_string "__DB_PASS__" "$db_pass" "../conf/config.json.exemple"
|
||||||
cp ../conf/config.json.exemple $final_path/config.json
|
cp ../conf/config.json.exemple $final_path/config.json
|
||||||
cp -a ../conf/codimd.service /etc/systemd/system/codimd.service
|
cp -a ../conf/codimd.service /etc/systemd/system/codimd.service
|
||||||
|
|
||||||
|
# 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
|
# INSTALL CODIMD
|
||||||
#==============================================
|
#==============================================
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
bin/setup
|
npm install
|
||||||
|
npm run build
|
||||||
|
node_modules/.bin/sequelize db:migrate
|
||||||
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
|
Loading…
Add table
Reference in a new issue