1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/invidious_ynh.git synced 2024-09-03 19:15:55 +02:00
This commit is contained in:
ericgaspar 2023-05-20 10:05:07 +02:00
parent 429d77dc87
commit 06651a2dbc
2 changed files with 7 additions and 17 deletions

View file

@ -63,7 +63,7 @@ ram.runtime = "50M"
api.protected = true
[resources.apt]
packages = "libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin imagemagick libsqlite3-dev zlib1g-dev libevent-dev libpcre3-dev"
packages = "dialog apt-utils libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin imagemagick libsqlite3-dev zlib1g-dev libevent-dev libpcre3-dev"
[resources.database]
type = "postgresql"

View file

@ -50,6 +50,7 @@ git clone https://github.com/iv-org/invidious "$install_dir" --quiet
pushd "$install_dir"
git reset --hard --quiet $version_commit
make
popd
#for i in $install_dir/config/sql/*.sql ; do
@ -60,17 +61,6 @@ popd
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
pushd "$install_dir"
make
popd
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=3
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# MODIFY A CONFIG FILE
#=================================================
@ -81,10 +71,6 @@ ynh_add_config --template="../conf/config.yml" --destination="$install_dir/confi
chmod 600 "$install_dir/config/config.yml"
chown $app:$app "$install_dir/config/config.yml"
pushd "$install_dir"
./invidious --migrate
popd
#=================================================
# SPECIFIC SETUP
#=================================================
@ -93,7 +79,8 @@ popd
ynh_script_progression --message="Building Invidious.. (this will take some time and resources!)" --weight=60
pushd "$install_dir"
#ynh_exec_warn_less shards install --production
./invidious --migrate
ynh_exec_warn_less shards install --production
ynh_exec_warn_less crystal build $install_dir/src/invidious.cr --release
popd
@ -102,6 +89,9 @@ popd
#=================================================
ynh_script_progression --message="Adding system configurations related to $app ..." --weight=10
# Create a dedicated NGINX config
ynh_add_nginx_config
ynh_add_config --template="../conf/cron_invidious" --destination="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"