This commit is contained in:
ericgaspar 2023-07-16 08:17:55 +02:00
parent e16737767b
commit b26bd2e576
4 changed files with 22 additions and 41 deletions

View file

@ -1,12 +1,21 @@
location / {
proxy_pass https://localhost:__PORT__;
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
proxy_pass https://127.0.0.1:__PORT__;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
location /ws/ {
proxy_pass https://localhost:__PORT__;
proxy_pass https://127.0.0.1:__PORT__;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";

View file

@ -10,18 +10,15 @@ version = "4.2.1~ynh1"
maintainers = ["salamandar"]
[upstream]
# NB: Only the "license" key is mandatory. Remove entries for which there's no relevant data
license = "AGPL-3.0"
website = "https://pydio.com"
# demo = "https://demo.example.com"
admindoc = "https://pydio.com/en/docs"
# userdoc = "https://yunohost.org/apps"
code = "https://github.com/pydio/cells"
cpe = "cpe:2.3:a:pydio:cells"
fund = "https://pydio.com/en/pricing"
[integration]
yunohost = ">= 11.1.14"
yunohost = ">= 11.1.21"
architectures = ["amd64", "armhf", "arm64"]
multi_instance = true
ldap = false
@ -35,8 +32,6 @@ ram.runtime = "50M"
type = "domain"
[install.init_main_permission]
# this is a generic question - ask strings are automatically handled by YunoHost's core
# This won't be saved as setting and will instead be used to initialize the SSOwat permission
type = "group"
default = "visitors"
@ -47,9 +42,6 @@ ram.runtime = "50M"
type = "password"
[resources]
# See the packaging documentation for the full set
# of explanation regarding the behavior and properties for each of those
[resources.sources]
[resources.sources.main]

View file

@ -19,6 +19,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1
ynh_setup_source --dest_dir="$install_dir"
chown -R "$app:www-data" "$install_dir"
chmod +x "$install_dir/cells"
#=================================================
# SYSTEM CONFIGURATION
@ -45,9 +46,9 @@ ynh_script_progression --message="Configuring Pydio..." --weight=1
ynh_add_config --template="install-conf.yml" --destination="$install_dir/install-conf.yml"
pushd "$install_dir" || ynh_die
pushd "$install_dir"
ynh_exec_as "$app" ./cells configure --cli --yaml "$install_dir/install-conf.yml"
popd || ynh_die
popd
ynh_secure_remove --file="$install_dir/install-conf.yml"
ynh_delete_file_checksum --file="$install_dir/install-conf.yml"

View file

@ -11,13 +11,6 @@ source /usr/share/yunohost/helpers
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
@ -35,10 +28,11 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]; then
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
ynh_setup_source --dest_dir="$install_dir" --keep="install-conf.yml"
fi
chown -R "$app:www-data" "$install_dir"
chmod +x "$install_dir/cells"
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
@ -60,27 +54,12 @@ yunohost service add "$app" --description="Pydio - A file sharing platform" --lo
#=================================================
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1
#ynh_script_progression --message="Updating a configuration file..." --weight=1
### Same as during install
###
### The file will automatically be backed-up if it's found to be manually modified (because
### ynh_add_config keeps track of the file's checksum)
#ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file"
ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file"
# FIXME: this should be handled by the core in the future
# You may need to use chmod 600 instead of 400,
# for example if the app is expected to be able to modify its own config
chmod 400 "$install_dir/some_config_file"
chown $app:$app "$install_dir/some_config_file"
### For more complex cases where you want to replace stuff using regexes,
### you shoud rely on ynh_replace_string (which is basically a wrapper for sed)
### When doing so, you also need to manually call ynh_store_file_checksum
###
### ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$install_dir/some_config_file"
### ynh_store_file_checksum --file="$install_dir/some_config_file"
#chmod 400 "$install_dir/some_config_file"
#chown $app:$app "$install_dir/some_config_file"
#=================================================
# START SYSTEMD SERVICE