mirror of
https://github.com/YunoHost-Apps/bonfire_ynh.git
synced 2024-09-03 18:16:01 +02:00
install works, still need to debug systemd start
This commit is contained in:
parent
dc0419d1fa
commit
822a0f7839
3 changed files with 22 additions and 18 deletions
|
@ -7,9 +7,7 @@ Type=simple
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__INSTALL_DIR__/
|
||||
Environment=NODE_ENV=production
|
||||
Environment="__YNH_NODE_LOAD_PATH__"
|
||||
ExecStart=just cmd __INSTALL_DIR__/_build/prod/rel/bonfire/bin/bonfire start daemon
|
||||
ExecStart=just cmd __INSTALL_DIR__/bin/bonfire start daemon
|
||||
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||
StandardError=inherit
|
||||
|
||||
|
|
|
@ -98,10 +98,11 @@ ram.runtime = "500M"
|
|||
autoupdate.strategy = "latest_github_release"
|
||||
|
||||
[resources.sources.deps_install]
|
||||
url = "https://github.com/bonfire-networks/bonfire-app/raw/v0.9.10-beta.61/deps-debian.sh"
|
||||
sha256 = "82829587f40183df7c2a4525dda3c1ff349319a10eafd3ea5368b7d643deb468"
|
||||
url = "https://github.com/bonfire-networks/bonfire-app/raw/main/deps-debian.sh"
|
||||
sha256 = "dc6a7fd593d092aec22782da01ac370a4ae318d4e9135cb7b594d2379a35de8f"
|
||||
format = "script"
|
||||
rename = "deps-debian.sh"
|
||||
extract = false
|
||||
|
||||
[resources.ports]
|
||||
|
||||
|
|
|
@ -9,26 +9,31 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..."
|
||||
|
||||
ynh_exec_warn_less "./deps-debian.sh"
|
||||
|
||||
# ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
# ynh_use_nodejs
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setting up source files..." --weight=1
|
||||
|
||||
# Download deps install script
|
||||
ynh_setup_source --source_id=deps_install --dest_dir="$install_dir"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chmod +x "$install_dir/deps-debian.sh"
|
||||
ls -la "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..."
|
||||
|
||||
ynh_exec_warn_less "HOME=$install_dir $install_dir/deps-debian.sh"
|
||||
|
||||
# ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
# ynh_use_nodejs
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
@ -57,7 +62,6 @@ ynh_store_file_checksum --file="$install_dir/.env"
|
|||
|
||||
chmod 400 "$install_dir/.env"
|
||||
chown $app:$app "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
|
@ -66,6 +70,7 @@ source $install_dir/.env
|
|||
export WITH_DOCKER=no # or source .env ? # Using this for now
|
||||
export TERM=linux # why is that not defined ?
|
||||
export TERMINFO=/etc/terminfo
|
||||
export PATH="$PATH:$install_dir/.local/share/mise/shims"
|
||||
|
||||
ynh_script_progression --message="Preparing Bonfire release..." --weight=1
|
||||
cd $install_dir
|
||||
|
@ -86,7 +91,7 @@ cd $install_dir
|
|||
#=================================================
|
||||
# START SYSTEMD SERVICE - Run the release
|
||||
#=================================================
|
||||
release_folder="_build/prod/rel/bonfire"
|
||||
release_folder="./"
|
||||
|
||||
### Not running the migration, they are done on startup anyway
|
||||
#ynh_script_progression --message="Running database migrations..." --weight=1
|
||||
|
@ -116,7 +121,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
|
|||
# CREATE ADMIN USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating admin user account..." --weight=1
|
||||
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd /var/www/bonfire/_build/prod/rel/bonfire/bin/bonfire rpc 'Bonfire.Me.make_account_and_user(\"$admin\", \"$(ynh_user_get_info --username=\"$admin\" --key=mail)\", \"$password\")'"
|
||||
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $install_dir/bin/bonfire rpc 'Bonfire.Me.make_account_and_user(\"$admin\", \"$(ynh_user_get_info --username=\"$admin\" --key=mail)\", \"$password\")'"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Reference in a new issue