mirror of
https://github.com/YunoHost-Apps/fider_ynh.git
synced 2024-09-03 18:36:11 +02:00
commit
ed31f2039c
11 changed files with 10 additions and 61 deletions
|
@ -20,7 +20,7 @@ Fider is a feedback portal that helps teams collect and prioritize customer feed
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- Share ideas, vote and discuss
|
- Share ideas, vote and discuss
|
||||||
- Authentication with support for Github, Facebook, Google, and custom OAuth providers
|
- Authentication with support for GitHub, Facebook, Google, and custom OAuth providers
|
||||||
- Customizable branding
|
- Customizable branding
|
||||||
- Public API, webhooks etc
|
- Public API, webhooks etc
|
||||||
- Markdown support
|
- Markdown support
|
||||||
|
|
|
@ -20,7 +20,7 @@ Fider is a feedback portal that helps teams collect and prioritize customer feed
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- Share ideas, vote and discuss
|
- Share ideas, vote and discuss
|
||||||
- Authentication with support for Github, Facebook, Google, and custom OAuth providers
|
- Authentication with support for GitHub, Facebook, Google, and custom OAuth providers
|
||||||
- Customizable branding
|
- Customizable branding
|
||||||
- Public API, webhooks etc
|
- Public API, webhooks etc
|
||||||
- Markdown support
|
- Markdown support
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Small description of the service
|
Description=Fider: Open feedback platform
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
|
|
@ -3,7 +3,7 @@ Fider is a feedback portal that helps teams collect and prioritize customer feed
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- Share ideas, vote and discuss
|
- Share ideas, vote and discuss
|
||||||
- Authentication with support for Github, Facebook, Google, and custom OAuth providers
|
- Authentication with support for GitHub, Facebook, Google, and custom OAuth providers
|
||||||
- Customizable branding
|
- Customizable branding
|
||||||
- Public API, webhooks etc
|
- Public API, webhooks etc
|
||||||
- Markdown support
|
- Markdown support
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"email": "felix@piedallu.me"
|
"email": "felix@piedallu.me"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 11.0.0"
|
"yunohost": ">= 11.0.9"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -49,13 +49,6 @@ ynh_backup --src_path="$final_path"
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP FAIL2BAN CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
|
|
||||||
# ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC BACKUP
|
# SPECIFIC BACKUP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -106,12 +106,6 @@ then
|
||||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC MODIFICATIONS
|
|
||||||
#=================================================
|
|
||||||
# ...
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALISATION
|
# GENERIC FINALISATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -25,7 +25,6 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
# path_url=$YNH_APP_ARG_PATH
|
|
||||||
path_url=/
|
path_url=/
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
language=$YNH_APP_ARG_LANGUAGE
|
language=$YNH_APP_ARG_LANGUAGE
|
||||||
|
@ -69,7 +68,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing dependencies..." --weight=1
|
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
install_golang_from_backports
|
install_golang_from_backports
|
||||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
|
@ -100,12 +99,6 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path/sources"
|
ynh_setup_source --dest_dir="$final_path/sources"
|
||||||
|
|
||||||
# FIXME: this should be managed by the core in the future
|
|
||||||
# Here, as a packager, you may have to tweak the ownerhsip/permissions
|
|
||||||
# such that the appropriate users (e.g. maybe www-data) can access
|
|
||||||
# files in some cases.
|
|
||||||
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
|
|
||||||
# this will be treated as a security issue.
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
|
@ -115,7 +108,7 @@ chown -R $app:www-data "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Compiling Fider application..." --weight=1
|
ynh_script_progression --message="Compiling Fider application..." --weight=1
|
||||||
|
|
||||||
build_fider
|
ynh_exec_warn_less build_fider
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
|
|
@ -81,17 +81,9 @@ ynh_remove_nginx_config
|
||||||
ynh_script_progression --message="Removing dependencies..." --weight=1
|
ynh_script_progression --message="Removing dependencies..." --weight=1
|
||||||
|
|
||||||
# Remove metapackage and its dependencies
|
# Remove metapackage and its dependencies
|
||||||
ynh_remove_app_dependencies
|
ynh_exec_warn_less ynh_remove_app_dependencies
|
||||||
ynh_remove_nodejs
|
ynh_remove_nodejs
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE FAIL2BAN CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
# ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=1
|
|
||||||
|
|
||||||
# Remove the dedicated Fail2Ban config
|
|
||||||
# ynh_remove_fail2ban_config
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC REMOVE
|
# SPECIFIC REMOVE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -65,15 +65,6 @@ chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
chmod +x "$final_path/run_fider"
|
chmod +x "$final_path/run_fider"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE FAIL2BAN CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
# ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=1
|
|
||||||
|
|
||||||
# ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
|
|
||||||
# ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
|
|
||||||
# ynh_systemd_action --action=restart --service_name=fail2ban
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -82,7 +73,7 @@ chmod +x "$final_path/run_fider"
|
||||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||||
|
|
||||||
# Define and install dependencies
|
# Define and install dependencies
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
install_golang_from_backports
|
install_golang_from_backports
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -91,12 +91,6 @@ then
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# FIXME: this should be managed by the core in the future
|
|
||||||
# Here, as a packager, you may have to tweak the ownerhsip/permissions
|
|
||||||
# such that the appropriate users (e.g. maybe www-data) can access
|
|
||||||
# files in some cases.
|
|
||||||
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
|
|
||||||
# this will be treated as a security issue.
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
|
@ -106,7 +100,7 @@ chown -R $app:www-data "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
install_golang_from_backports
|
install_golang_from_backports
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -160,14 +154,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# UPGRADE FAIL2BAN
|
|
||||||
#=================================================
|
|
||||||
# ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=1
|
|
||||||
|
|
||||||
# Create a dedicated Fail2Ban config
|
|
||||||
# ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue