1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/couchdb_ynh.git synced 2024-09-03 18:16:11 +02:00
This commit is contained in:
ericgaspar 2022-01-04 22:00:23 +01:00
parent eefebbab01
commit f264cbe49c
No known key found for this signature in database
GPG key ID: 574F281483054D44
5 changed files with 11 additions and 24 deletions

View file

@ -1,10 +1,5 @@
location __PATH__/ { location __PATH__/ {
# Force usage of https
# if ($scheme = http) {
# rewrite ^ https://$server_name$request_uri? permanent;
# }
proxy_pass http://127.0.0.1:__PORT__/; proxy_pass http://127.0.0.1:__PORT__/;
proxy_redirect off; proxy_redirect off;
proxy_set_header Host $host; proxy_set_header Host $host;
@ -27,5 +22,4 @@ location __PATH__/ {
# Include SSOWAT user panel. # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;
more_clear_input_headers 'Accept-Encoding'; more_clear_input_headers 'Accept-Encoding';
} }

View file

@ -22,7 +22,7 @@
"url": "https://squeak.eauchat.org" "url": "https://squeak.eauchat.org"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.2.4" "yunohost": ">= 4.3.0"
}, },
"multi_instance": false, "multi_instance": false,
"services": [ "services": [
@ -32,8 +32,7 @@
"install" : [ "install" : [
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain"
"example": "example.com"
}, },
{ {
"name": "path", "name": "path",
@ -52,8 +51,7 @@
}, },
{ {
"name": "password", "name": "password",
"type": "password", "type": "password"
"example": "Choose a password"
} }
] ]
} }

View file

@ -124,7 +124,7 @@ ynh_use_logrotate
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description="Open-source document-oriented NoSQL database" --log="/var/log/$app/$app.log" --needs_exposed_ports "$port" yunohost service add $app --description="Open-source document-oriented NoSQL database" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# SETUP FAIL2BAN # SETUP FAIL2BAN
@ -139,17 +139,15 @@ ynh_add_fail2ban_config --logpath="/var/log/couchdb/couchdb.log" --failregex="[w
#================================================= #=================================================
ynh_script_progression --message="Configuring permissions..." --weight=3 ynh_script_progression --message="Configuring permissions..." --weight=3
# Setup that clicking SSO tile opens fauxton UI
ynh_permission_url --permission="main" --url="/_utils/index.html" --add_url="/" --auth_header=false
# Make app public if necessary # Make app public if necessary
if [ $is_public -eq 1 ] if [ $is_public -eq 1 ]
then then
# Everyone can access the app.
# The "main" permission is automatically created before the install script.
ynh_permission_update --permission="main" --add="visitors" ynh_permission_update --permission="main" --add="visitors"
fi fi
# Setup that clicking SSO tile opens fauxton UI
ynh_permission_url --permission="main" --url="/_utils/index.html" --add_url="/" --auth_header=false
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================

View file

@ -38,10 +38,7 @@ port=$(ynh_app_setting_get --app=$app --key=port)
#================================================= #=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=2 ynh_script_progression --message="Validating restoration parameters..." --weight=2
ynh_webpath_available --domain=$domain --path_url=$path_url \ test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|| ynh_die --message="Path not available: ${domain}${path_url}"
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
#================================================= #=================================================
# STANDARD RESTORATION STEPS # STANDARD RESTORATION STEPS
@ -80,7 +77,7 @@ ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# REINSTALL COUCHDB # REINSTALL COUCHDB
#================================================= #=================================================
ynh_script_progression --message="Reinstalling couchdb..." --weight=40 ynh_script_progression --message="Reinstalling Couchdb..." --weight=40
COUCHDB_PASSWORD=$password COUCHDB_PASSWORD=$password
echo "couchdb couchdb/mode select standalone echo "couchdb couchdb/mode select standalone
@ -106,7 +103,7 @@ chown -R $app:$app "$final_path"
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description="Open-source document-oriented NoSQL database" --log="/var/log/$app/$app.log" --needs_exposed_ports "$port" yunohost service add $app --description="Open-source document-oriented NoSQL database" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# RESTORE THE LOGROTATE CONFIGURATION # RESTORE THE LOGROTATE CONFIGURATION

View file

@ -109,7 +109,7 @@ ynh_use_logrotate --non-append
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
yunohost service add $app --description="Open-source document-oriented NoSQL database" --log="/var/log/$app/$app.log" --needs_exposed_ports "$port" yunohost service add $app --description="Open-source document-oriented NoSQL database" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# UPGRADE FAIL2BAN # UPGRADE FAIL2BAN