1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/invidious_ynh.git synced 2024-09-03 19:15:55 +02:00

Merge branch 'testing' into enh-testing

This commit is contained in:
Éric Gaspar 2021-03-04 08:57:33 +01:00 committed by GitHub
commit ba9684c337
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 17 deletions

View file

@ -19,3 +19,23 @@ location / {
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
location __PATH__/embed/ {
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://127.0.0.1:3000/embed/;
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-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
more_set_headers "X-Frame-Options : ALLOWALL";
}

View file

@ -6,7 +6,7 @@
"en": "Alternative front-end to YouTube",
"fr": "Front-end alternatif à YouTube"
},
"version": "0.20.1~ynh3",
"version": "0.20.1~ynh5",
"url": "https://invidio.us/",
"license": "GPL-3.0-only",
"maintainer": {

View file

@ -5,7 +5,7 @@
#=================================================
# dependencies used by the app
pkg_dependencies="apt-transport-https libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin libsqlite3-dev zlib1g-dev"
pkg_dependencies="crystal apt-transport-https libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin libsqlite3-dev zlib1g-dev"
#=================================================
# PERSONAL HELPERS

View file

@ -46,10 +46,9 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#=================================================
ynh_script_progression --message="Storing installation settings..." --weight=2
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=language --value=$language
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=language --value=$language
#=================================================
# STANDARD MODIFICATIONS
@ -67,10 +66,10 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=9
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
ynh_exec_warn_less apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
ynh_install_extra_repo --repo="deb https://dl.bintray.com/crystal/deb all stable" --append
# Install Crystal
ynh_install_extra_app_dependencies --repo="deb https://dist.crystal-lang.org/apt crystal main" --package="crystal" --key="https://keybase.io/crystal/pgp_keys.asc"
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE A POSTGRESQL DATABASE
@ -180,7 +179,7 @@ yunohost service add $app --description="Invidious is an alternative front-end t
ynh_script_progression --message="Starting a systemd service..." --weight=2
# Start a systemd service
ynh_systemd_action --service_name=$app --action=start --log_path="systemd"
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
#=================================================
# SETUP SSOWAT

View file

@ -82,6 +82,9 @@ chown -R $app: $final_path
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=7
ynh_exec_warn_less apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
ynh_install_extra_repo --repo="deb https://dl.bintray.com/crystal/deb all stable" --append
# Define and install dependencies
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
@ -114,7 +117,7 @@ yunohost service add $app --description="Invidious is an alternative front-end t
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action=start --log_path="systemd"
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
#=================================================
# RESTORE VARIOUS FILES

View file

@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port)
language=$(ynh_app_setting_get --app=$app --key=language)
@ -53,17 +52,17 @@ ynh_abort_if_errors
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action=stop --log_path="systemd"
ynh_systemd_action --service_name=$app --action=stop --log_path=systemd
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=8
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
ynh_exec_warn_less apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
ynh_install_extra_repo --repo="deb https://dl.bintray.com/crystal/deb all stable" --append
# Install Crystal
ynh_install_extra_app_dependencies --repo="deb https://dist.crystal-lang.org/apt crystal main" --package="crystal" --key="https://keybase.io/crystal/pgp_keys.asc"
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -114,7 +113,10 @@ ynh_system_user_create --username=$app
#=================================================
ynh_script_progression --message="Modifying a config file..." --weight=3
ynh_backup_if_checksum_is_different --file="$final_path/config/config.yml"
ynh_add_config --template="../conf/config.yml" --destination="$final_path/config/config.yml"
ynh_store_file_checksum --file="$final_path/config/config.yml"
#=================================================
@ -156,7 +158,7 @@ yunohost service add $app --description="Invidious is an alternative front-end t
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action=restart --log_path="systemd"
ynh_systemd_action --service_name=$app --action=restart --log_path=systemd
#=================================================
# RELOAD NGINX