1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/peertube_ynh.git synced 2024-09-03 19:56:29 +02:00

Update to v1.0.0-alpha.6, using trusted sources for dependencies

This commit is contained in:
Pierre-Antoine Rault 2018-03-03 20:05:39 +01:00
parent 69be43b53c
commit 987c83682b
2 changed files with 17 additions and 23 deletions

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v0.0.29-alpha/peertube-v0.0.29-alpha.zip
SOURCE_SUM=91fff3e29c35e795bfab49f9753f8c034456e4d9bcbd8d438836071f799832c3
SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-alpha.6/peertube-v1.0.0-alpha.6.zip
SOURCE_SUM=afe91c3685c3b622d96f473b1e7636862f0f5f76fea599f7d63ab4a46439b5c9
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true

View file

@ -80,23 +80,25 @@ ynh_app_setting_set $app port $port
# INSTALL DEPENDENCIES
#=================================================
# Import debian archive pubkey, need on ARM arch
# taken from https://github.com/YunoHost-Apps/mastodon_ynh/blob/7db022c2cc3d6e9fa2e26803c4a424a3bb8c9bd4/scripts/install#L55
arch=$(uname -m)
if [[ $arch = arm* ]]; then
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010
fi
# install yarn
wget https://github.com/yarnpkg/yarn/releases/download/v1.5.1/yarn_1.5.1_all.deb
echo "a4770cd8dcb13dc9a9218940dbd24b510ddf5eec78adb4e0da9ef3760b55a76e yarn_1.5.1_all.deb" | sha256sum -c || ynh_die
sudo dpkg -i yarn_1.5.1_all.deb
# Install source.list debian package backports & yarn
sudo cp ../conf/backports.list /etc/apt/sources.list.d/
sudo curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
sudo cp ../conf/yarn.list /etc/apt/sources.list.d/
# add backports (required to install ffmpeg)
echo "deb http://httpredir.debian.org/debian jessie-backports main" | sudo tee /etc/apt/sources.list.d/jessie-backports.list
ynh_package_update
ynh_install_app_dependencies postgresql-9.4 yarn ffmpeg redis-server redis-tools
# install postgresql, ffmpeg, redis
ynh_install_app_dependencies postgresql-9.4 ffmpeg redis-server redis-tools
# install nodejs
ynh_install_nodejs 8
#=================================================
# DATABASE SETUP
#=================================================
# Create postgresql database
db_name="peertube_prod"
db_pwd=$(ynh_string_random 30)
@ -115,16 +117,14 @@ ynh_psql_execute_as_root \
ynh_system_user_create $app
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
# DOWNLOAD, CHECK AND UNPACK PEERTUBE SOURCE
#=================================================
ynh_app_setting_set $app final_path $final_path
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source "$final_path"
# cp -f ../conf/yarn.lock $final_path/client/yarn.lock
cp ../conf/production.yaml $final_path/config/production.yaml
(cd $final_path && yarn install --production --pure-lockfile)
# (cd $final_path && npm run build)
#=================================================
# NGINX CONFIGURATION
@ -134,12 +134,6 @@ cp ../conf/production.yaml $final_path/config/production.yaml
sudo mkdir -p "/etc/nginx/conf.d/${domain}.d"
ynh_add_nginx_config
#=================================================
# SPECIFIC SETUP
#=================================================
# ...
#=================================================
#=================================================
# SETUP APPLICATION WITH CURL
#=================================================