From bc7a32da024865b57cbd882267c4b05e614d8952 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 12 May 2021 09:49:01 +0200 Subject: [PATCH] Defines custom port to listen --- conf/couch_ynh.ini | 3 +++ scripts/install | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/conf/couch_ynh.ini b/conf/couch_ynh.ini index 3739492..26981b3 100644 --- a/conf/couch_ynh.ini +++ b/conf/couch_ynh.ini @@ -2,3 +2,6 @@ [chttpd] ; prevent non admin users to be able to access the list of all databases admin_only_all_dbs = true + +; Defines the port number to listen: +port = __PORT__ diff --git a/scripts/install b/scripts/install index 4eec0e1..668916e 100755 --- a/scripts/install +++ b/scripts/install @@ -60,9 +60,7 @@ ynh_app_setting_set --app=$app --key=password --value=$password ynh_script_progression --message="Finding an available port..." --weight=2 # Find an available port -port="5984" -# NOTE: ideally, it would be nice to make sure that port 5984 is not taken, but if doing so, something should be done on couchdb install to customize the port it uses -# port=$(ynh_find_port --port=5984) +port=$(ynh_find_port --port=5984) ynh_app_setting_set --app=$app --key=port --value=$port #=================================================