mirror of
https://github.com/YunoHost-Apps/ghost_ynh.git
synced 2024-09-03 19:16:02 +02:00
fix
This commit is contained in:
parent
c9d676dee4
commit
450a1199ab
4 changed files with 16 additions and 23 deletions
|
@ -20,7 +20,7 @@ fund = "https://opencollective.com/ghost"
|
|||
arbitrary-limitations.en = "Ghost developers have chosen to only support MySQL. YunoHost relying on MariaDB, incompatibilities may arise. For more information: https://github.com/TryGhost/Ghost/issues/15729#issuecomment-1299297720"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.2"
|
||||
yunohost = ">= 11.2.20"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
ldap = false
|
||||
|
@ -64,7 +64,7 @@ ram.runtime = "1G"
|
|||
[resources.ports]
|
||||
|
||||
[resources.apt]
|
||||
packages = "mailutils mariadb-server"
|
||||
packages = "mailutils, mariadb-server"
|
||||
|
||||
[resources.database]
|
||||
type = "mysql"
|
||||
|
|
|
@ -12,26 +12,20 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing NodeJS dependencies..."
|
||||
ynh_script_progression --message="Installing NodeJS..." --weight=3
|
||||
|
||||
# Install Nodejs
|
||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
||||
|
||||
# Upgrade NPM
|
||||
ynh_npm install --global npm@latest
|
||||
|
||||
# Install Yarn
|
||||
ynh_npm install --global yarn
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
|
||||
# Install Ghost-CLI
|
||||
|
||||
mkdir -p $install_dir/ghost
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:$app "$install_dir"
|
||||
|
||||
pushd $install_dir
|
||||
ynh_script_progression --message="Installing and configuring Ghost..."
|
||||
ynh_script_progression --message="Installing and configuring $app..."
|
||||
ynh_use_nodejs
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install npm@latest
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ghost-cli@latest
|
||||
ynh_exec_as $app $ynh_node_load_PATH $install_dir/node_modules/ghost-cli/bin/ghost install $(ynh_app_upstream_version) \
|
||||
--no-prompt --no-setup-systemd --no-start \
|
||||
|
@ -65,7 +59,7 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||
|
||||
# Create a dedicated nginx config
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
# Create a dedicated systemd config
|
||||
|
|
|
@ -29,7 +29,6 @@ ynh_remove_nginx_config
|
|||
|
||||
ynh_remove_logrotate
|
||||
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -39,17 +39,13 @@ ynh_script_progression --message="Stopping a systemd service..."
|
|||
|
||||
ynh_systemd_action --service_name=$app --action=stop --log_path="systemd" --line_match="Ghost has shut down" --timeout=60
|
||||
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
# Install Nodejs
|
||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
||||
ynh_script_progression --message="Updating NodeJS..." --weight=1
|
||||
|
||||
# Upgrade NPM
|
||||
ynh_npm install --global npm@latest
|
||||
|
||||
# Install Yarn
|
||||
ynh_npm install --global yarn
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version"
|
||||
|
||||
#=================================================
|
||||
# UPGRADE
|
||||
|
@ -60,7 +56,7 @@ ynh_npm install --global yarn
|
|||
if ynh_compare_current_package_version --comparison le --version 5.26.4~ynh1
|
||||
then
|
||||
|
||||
ynh_script_progression --message="Upgrading from older packaging of Ghost..."
|
||||
ynh_script_progression --message="Upgrading from older packaging of $app..."
|
||||
|
||||
# Create a temporary directory
|
||||
tmpdir="$(mktemp -d)"
|
||||
|
@ -86,6 +82,8 @@ then
|
|||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
pushd $install_dir
|
||||
ynh_use_nodejs
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install npm@latest
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ghost-cli@latest
|
||||
ynh_exec_as $app $ynh_node_load_PATH $install_dir/node_modules/ghost-cli/bin/ghost install $(ynh_app_upstream_version) \
|
||||
--no-prompt --no-setup-systemd --no-start \
|
||||
|
@ -105,6 +103,8 @@ else
|
|||
|
||||
# Upgrade Ghost CLI
|
||||
pushd $install_dir
|
||||
ynh_use_nodejs
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install npm@latest
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ghost-cli@latest
|
||||
popd
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue