mirror of
https://github.com/YunoHost-Apps/yunorunner_ynh.git
synced 2024-09-03 20:36:13 +02:00
Apply example_ynh
make bullseye ready
This commit is contained in:
parent
6751c58c2d
commit
4b25dedbbe
13 changed files with 64 additions and 63 deletions
|
@ -2,8 +2,8 @@
|
|||
; pre-install
|
||||
sudo git clone https://github.com/YunoHost/CI_package_check /home/CI_package_check
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
domain="domain.tld"
|
||||
path="/path"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
alias __FINALPATH__/;
|
||||
|
||||
# Path to source
|
||||
alias __FINALPATH__/ ;
|
||||
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
|
|
|
@ -7,7 +7,7 @@ Type=simple
|
|||
Restart=always
|
||||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__FINALPATH__
|
||||
WorkingDirectory=__FINALPATH__/
|
||||
ExecStart=__FINALPATH__/venv/bin/python ./run.py
|
||||
|
||||
[Install]
|
||||
|
|
0
doc/.gitkeep
Normal file
0
doc/.gitkeep
Normal file
3
doc/DISCLAIMER.md
Normal file
3
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
* Any known limitations, constrains or stuff not working, such as (but not limited to):
|
||||
* You need to install [CI_package_check](https://github.com/YunoHost/CI_package_check) using the build_CI.sh script before installing YunoRunner
|
||||
* When YunoRunner is installed, modify the systemd script to add the path of the script analyseCI.sh. The default systemd is configured to `/home/CI_package_check/analyseCI.sh`
|
0
doc/screenshots/.gitkeep
Normal file
0
doc/screenshots/.gitkeep
Normal file
BIN
doc/screenshots/screenshot1.png
Normal file
BIN
doc/screenshots/screenshot1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.9 KiB |
|
@ -8,6 +8,10 @@
|
|||
},
|
||||
"version": "2021-06-30~ynh1",
|
||||
"url": "https://github.com/YunoHost/yunorunner",
|
||||
"upstream": {
|
||||
"license": "GPL-3.0-or-later",
|
||||
"code": "https://github.com/YunoHost/yunorunner"
|
||||
},
|
||||
"license": "GPL-3.0-or-later",
|
||||
"maintainer": {
|
||||
"name": ""
|
||||
|
|
|
@ -9,7 +9,7 @@ pkg_dependencies="python3-venv python3-dev python3-pip sqlite3"
|
|||
|
||||
yunorunner_repository="https://github.com/YunoHost/yunorunner"
|
||||
|
||||
yunorunner_release="eda079abcfdddbcefa1ceb863f9224b1cc077eb2"
|
||||
yunorunner_release="9cde6e979a59424396659fa934323a677ba8c960"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -71,7 +71,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
ynh_script_progression --message="Configuring system user..."
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -110,9 +110,6 @@ pushd $final_path
|
|||
python3 -m venv venv
|
||||
venv/bin/pip install --upgrade pip
|
||||
venv/bin/pip install -r requirements-frozen.txt
|
||||
#Fix current websocket version error (2019-02-14)
|
||||
venv/bin/pip uninstall -y websockets
|
||||
venv/bin/pip install 'websockets>=6.0,<7.0'
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -26,6 +26,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
||||
#=================================================
|
||||
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||
then
|
||||
ynh_script_progression --message="Removing $app service integration..."
|
||||
|
|
|
@ -94,9 +94,6 @@ pushd $final_path
|
|||
python3 -m venv venv
|
||||
venv/bin/pip install --upgrade pip
|
||||
venv/bin/pip install -r requirements-frozen.txt
|
||||
#Fix current websocket version error (2019-02-14)
|
||||
venv/bin/pip uninstall -y websockets
|
||||
venv/bin/pip install 'websockets>=6.0,<7.0'
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -28,35 +28,6 @@ ynh_script_progression --message="Checking version..."
|
|||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
# If port doesn't exist, create it
|
||||
if [ -z "$port" ]; then
|
||||
port=4242
|
||||
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||
fi
|
||||
|
||||
if [[ ! -d "$final_path/.git/" ]]
|
||||
then
|
||||
git init "$final_path"
|
||||
pushd "$final_path"
|
||||
git remote add origin "$yunorunner_repository"
|
||||
popd
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
||||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
|
||||
# Remove Pythonz
|
||||
ynh_secure_remove --file="$final_path/.pythonz"
|
||||
|
||||
#=================================================
|
||||
# CLOSE A PORT
|
||||
#=================================================
|
||||
|
@ -96,13 +67,42 @@ ynh_script_progression --message="Stopping a systemd service..."
|
|||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped YunoRunner CI"
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
# If port doesn't exist, create it
|
||||
if [ -z "$port" ]; then
|
||||
port=4242
|
||||
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||
fi
|
||||
|
||||
if [[ ! -d "$final_path/.git/" ]]
|
||||
then
|
||||
git init "$final_path"
|
||||
pushd "$final_path"
|
||||
git remote add origin "$yunorunner_repository"
|
||||
popd
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
||||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
|
||||
# Remove Pythonz
|
||||
ynh_secure_remove --file="$final_path/.pythonz"
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..."
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -149,9 +149,6 @@ pushd $final_path
|
|||
python3 -m venv venv
|
||||
venv/bin/pip install --upgrade pip
|
||||
venv/bin/pip install -r requirements-frozen.txt
|
||||
#Fix current websocket version error (2019-02-14)
|
||||
venv/bin/pip uninstall -y websockets
|
||||
venv/bin/pip install 'websockets>=6.0,<7.0'
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue