mirror of
https://github.com/YunoHost-Apps/lychee_ynh.git
synced 2024-09-03 19:36:36 +02:00
e9ff45b992
* Update demo URL (#126) * Auto-update READMEs * [autopatch] Automatic patch attempt for helpers 2.1 (#127) * [autopatch] Automatic patch attempt for helpers 2.1 * cleaning --------- Co-authored-by: Yunohost-Bot <> Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> * Update manifest.toml * Auto-update READMEs --------- Co-authored-by: Marie <marie.jeammet@protonmail.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com>
65 lines
2.1 KiB
Bash
Executable file
65 lines
2.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
ynh_app_setting_set --key=php_upload_max_filesize --value=1G
|
|
|
|
#=================================================
|
|
# INITIALIZE AND STORE SETTINGS
|
|
#=================================================
|
|
|
|
timezone="$(cat /etc/timezone)"
|
|
|
|
#=================================================
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
#=================================================
|
|
ynh_script_progression "Setting up source files..."
|
|
|
|
ynh_setup_source --dest_dir="$install_dir"
|
|
|
|
#=================================================
|
|
# APP INITIAL CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression "Adding $app's configuration files..."
|
|
|
|
ynh_config_add --template=".env" --destination="$install_dir/.env"
|
|
|
|
#=================================================
|
|
# SYSTEM CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression "Adding system configurations related to $app..."
|
|
|
|
ynh_config_add_phpfpm
|
|
|
|
ynh_config_add_nginx
|
|
|
|
#=================================================
|
|
# INSTALL APP WITH COMPOSER
|
|
#=================================================
|
|
ynh_script_progression "Installing app with Composer..."
|
|
|
|
ynh_composer_install
|
|
ynh_composer_exec install --no-dev
|
|
|
|
#=================================================
|
|
# BUILDING
|
|
#=================================================
|
|
ynh_script_progression "configuring $app..."
|
|
|
|
pushd "$install_dir"
|
|
"php$php_version" artisan key:generate -n --force --env
|
|
"php$php_version" artisan migrate -n --force
|
|
"php$php_version" artisan config:clear -n
|
|
"php$php_version" artisan config:cache -n
|
|
popd
|
|
|
|
chmod -R 775 /home/yunohost.app/$app/
|
|
chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads"
|
|
chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/"
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression "Installation of $app completed"
|