mirror of
https://github.com/YunoHost-Apps/snipeit_ynh.git
synced 2024-09-03 20:26:16 +02:00
Merge pull request #62 from YunoHost-Apps/testing
This commit is contained in:
commit
feec85c7ae
14 changed files with 159 additions and 136 deletions
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
|||
|
||||
# Snipe-IT for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/snipeit)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/snipeit/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=snipeit)
|
||||
|
||||
|
@ -18,7 +18,7 @@ It shall NOT be edited by hand.
|
|||
|
||||
Snipeit is a FOSS project for asset management in IT Operations. Knowing who has which laptop, when it was purchased in order to depreciate it correctly, handling software licenses, etc.
|
||||
|
||||
**Shipped version:** 6.4.2~ynh1
|
||||
**Shipped version:** 7.0.9~ynh1
|
||||
|
||||
**Demo:** <https://snipeitapp.com/demo/>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ No se debe editar a mano.
|
|||
|
||||
# Snipe-IT para Yunohost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/snipeit)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/snipeit/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=snipeit)
|
||||
|
||||
|
@ -18,7 +18,7 @@ No se debe editar a mano.
|
|||
|
||||
Snipeit is a FOSS project for asset management in IT Operations. Knowing who has which laptop, when it was purchased in order to depreciate it correctly, handling software licenses, etc.
|
||||
|
||||
**Versión actual:** 6.4.2~ynh1
|
||||
**Versión actual:** 7.0.9~ynh1
|
||||
|
||||
**Demo:** <https://snipeitapp.com/demo/>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ EZ editatu eskuz.
|
|||
|
||||
# Snipe-IT YunoHost-erako
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/snipeit)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/snipeit/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=snipeit)
|
||||
|
||||
|
@ -18,7 +18,7 @@ EZ editatu eskuz.
|
|||
|
||||
Snipeit is a FOSS project for asset management in IT Operations. Knowing who has which laptop, when it was purchased in order to depreciate it correctly, handling software licenses, etc.
|
||||
|
||||
**Paketatutako bertsioa:** 6.4.2~ynh1
|
||||
**Paketatutako bertsioa:** 7.0.9~ynh1
|
||||
|
||||
**Demoa:** <https://snipeitapp.com/demo/>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
|
|||
|
||||
# Snipe-IT pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/snipeit)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/snipeit/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=snipeit)
|
||||
|
||||
|
@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main.
|
|||
|
||||
Snipeit est un projet FOSS pour la gestion des actifs dans les opérations informatiques. Savoir qui possède quel ordinateur portable, quand il a été acheté pour bien l'amortir, gérer les licences des logiciels, etc.
|
||||
|
||||
**Version incluse :** 6.4.2~ynh1
|
||||
**Version incluse :** 7.0.9~ynh1
|
||||
|
||||
**Démo :** <https://snipeitapp.com/demo/>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ NON debe editarse manualmente.
|
|||
|
||||
# Snipe-IT para YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/snipeit)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/snipeit/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=snipeit)
|
||||
|
||||
|
@ -18,7 +18,7 @@ NON debe editarse manualmente.
|
|||
|
||||
Snipeit is a FOSS project for asset management in IT Operations. Knowing who has which laptop, when it was purchased in order to depreciate it correctly, handling software licenses, etc.
|
||||
|
||||
**Versión proporcionada:** 6.4.2~ynh1
|
||||
**Versión proporcionada:** 7.0.9~ynh1
|
||||
|
||||
**Demo:** <https://snipeitapp.com/demo/>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
# YunoHost 上的 Snipe-IT
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/snipeit)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/snipeit/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=snipeit)
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
Snipeit is a FOSS project for asset management in IT Operations. Knowing who has which laptop, when it was purchased in order to depreciate it correctly, handling software licenses, etc.
|
||||
|
||||
**分发版本:** 6.4.2~ynh1
|
||||
**分发版本:** 7.0.9~ynh1
|
||||
|
||||
**演示:** <https://snipeitapp.com/demo/>
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ PUBLIC_FILESYSTEM_DISK=local_public
|
|||
#PRIVATE_FILESYSTEM_DISK=s3_private
|
||||
#PUBLIC_FILESYSTEM_DISK=s3_public
|
||||
|
||||
|
||||
# --------------------------------------------
|
||||
# REQUIRED: DATABASE SETTINGS
|
||||
# --------------------------------------------
|
||||
|
@ -41,6 +42,7 @@ DB_SSL_KEY_PATH=null
|
|||
DB_SSL_CERT_PATH=null
|
||||
DB_SSL_CA_PATH=null
|
||||
DB_SSL_CIPHER=null
|
||||
DB_SSL_VERIFY_SERVER=null
|
||||
|
||||
# --------------------------------------------
|
||||
# REQUIRED: OUTGOING MAIL SERVER SETTINGS
|
||||
|
@ -50,12 +52,16 @@ MAIL_HOST=127.0.0.1
|
|||
MAIL_PORT=25
|
||||
MAIL_USERNAME=__APP__
|
||||
MAIL_PASSWORD=__MAIL_PWD__
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDR=__APP__@__DOMAIN__
|
||||
MAIL_FROM_NAME='Snip-IT'
|
||||
MAIL_REPLYTO_ADDR=__APP__@__DOMAIN__
|
||||
MAIL_REPLYTO_NAME='Snipe-IT'
|
||||
MAIL_AUTO_EMBED_METHOD='attachment'
|
||||
MAIL_TLS_VERIFY_PEER=true
|
||||
|
||||
# MAIL_ENCRYPTION is no longer supported. SymfonyMailer will use tls if it's
|
||||
# advertised, and won't if it's not. If you want to use your mail server's IP but it's failing
|
||||
# because of certificate errors, set MAIL_TLS_VERIFY_PEER-true
|
||||
|
||||
# --------------------------------------------
|
||||
# REQUIRED: IMAGE LIBRARY
|
||||
|
@ -63,6 +69,7 @@ MAIL_AUTO_EMBED_METHOD='attachment'
|
|||
# --------------------------------------------
|
||||
IMAGE_LIB=gd
|
||||
|
||||
|
||||
# --------------------------------------------
|
||||
# OPTIONAL: BACKUP SETTINGS
|
||||
# --------------------------------------------
|
||||
|
@ -83,6 +90,8 @@ COOKIE_NAME=snipeit_session
|
|||
COOKIE_DOMAIN=null
|
||||
SECURE_COOKIES=false
|
||||
API_TOKEN_EXPIRATION_YEARS=15
|
||||
BS_TABLE_STORAGE=cookieStorage
|
||||
BS_TABLE_DEEPLINK=true
|
||||
|
||||
# --------------------------------------------
|
||||
# OPTIONAL: SECURITY HEADER SETTINGS
|
||||
|
@ -91,6 +100,7 @@ APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1
|
|||
ALLOW_IFRAMING=false
|
||||
REFERRER_POLICY=same-origin
|
||||
ENABLE_CSP=false
|
||||
ADDITIONAL_CSP_URLS=null
|
||||
CORS_ALLOWED_ORIGINS=null
|
||||
ENABLE_HSTS=false
|
||||
|
||||
|
@ -146,6 +156,7 @@ AWS_DEFAULT_REGION=null
|
|||
# --------------------------------------------
|
||||
LOGIN_MAX_ATTEMPTS=5
|
||||
LOGIN_LOCKOUT_DURATION=60
|
||||
LOGIN_AUTOCOMPLETE=false
|
||||
|
||||
# --------------------------------------------
|
||||
# OPTIONAL: FORGOTTEN PASSWORD SETTINGS
|
||||
|
@ -173,6 +184,15 @@ REQUIRE_SAML=false
|
|||
API_THROTTLE_PER_MINUTE=120
|
||||
CSV_ESCAPE_FORMULAS=true
|
||||
|
||||
# --------------------------------------------
|
||||
# OPTIONAL: HASHING
|
||||
# --------------------------------------------
|
||||
HASHING_DRIVER='bcrypt'
|
||||
BCRYPT_ROUNDS=10
|
||||
ARGON_MEMORY=1024
|
||||
ARGON_THREADS=2
|
||||
ARGON_TIME=2
|
||||
|
||||
# --------------------------------------------
|
||||
# OPTIONAL: SCIM
|
||||
# --------------------------------------------
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
|
||||
|
||||
packaging_format = 2
|
||||
|
||||
id = "snipeit"
|
||||
|
@ -5,7 +7,7 @@ name = "Snipe-IT"
|
|||
description.en = "Manage assets for IT operations"
|
||||
description.fr = "Gestionnaire de ressources informatiques"
|
||||
|
||||
version = "6.4.2~ynh1"
|
||||
version = "7.0.9~ynh1"
|
||||
|
||||
maintainers = []
|
||||
|
||||
|
@ -50,8 +52,8 @@ ram.runtime = "50M"
|
|||
[resources]
|
||||
[resources.sources]
|
||||
[resources.sources.main]
|
||||
url = "https://github.com/snipe/snipe-it/archive/refs/tags/v6.4.2.tar.gz"
|
||||
sha256 = "b2b3c9fa4501e0b81c41562db40798a786e92dd932e1de40bbc8e731c1474135"
|
||||
url = "https://github.com/snipe/snipe-it/archive/refs/tags/v7.0.9.tar.gz"
|
||||
sha256 = "632ebcbd982da019eff6749b23c53b304b20b416cf1636e6e9cbd5bccf7e3367"
|
||||
autoupdate.strategy = "latest_github_tag"
|
||||
|
||||
[resources.system_user]
|
||||
|
@ -63,7 +65,19 @@ ram.runtime = "50M"
|
|||
main.url = "/"
|
||||
|
||||
[resources.apt]
|
||||
packages = "mariadb-server, openssl, php8.1-curl, php8.1-ldap, php8.1-mysql, php8.1-gd, php8.1-xml, php8.1-mbstring, php8.1-zip, php8.1-bcmath, php8.1-redis"
|
||||
packages = [
|
||||
"mariadb-server",
|
||||
"openssl",
|
||||
"php8.1-curl",
|
||||
"php8.1-ldap",
|
||||
"php8.1-mysql",
|
||||
"php8.1-gd",
|
||||
"php8.1-xml",
|
||||
"php8.1-mbstring",
|
||||
"php8.1-zip",
|
||||
"php8.1-bcmath",
|
||||
"php8.1-redis",
|
||||
]
|
||||
|
||||
[resources.database]
|
||||
type = "mysql"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
@ -22,19 +20,13 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
ynh_backup --src_path="$install_dir"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC BACKUP
|
||||
#=================================================
|
||||
# BACKUP THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC STARTING
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
@ -21,7 +19,14 @@ ynh_change_url_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
ynh_replace_string --match_string="APP_URL=https://$old_domain" --replace_string="APP_URL=https://$new_domain" --target_file=$install_dir/.env
|
||||
ynh_replace_string --target_file="$install_dir/.env" \
|
||||
--match_string="APP_URL=https://$old_domain" \
|
||||
--replace_string="APP_URL=https://$new_domain"
|
||||
|
||||
pushd "$install_dir"
|
||||
ynh_exec_as "$app" "php$phpversion" artisan config:clear -n
|
||||
ynh_exec_as "$app" "php$phpversion" artisan config:cache -n
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
@ -10,7 +8,13 @@ source _common.sh
|
|||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
|
||||
# INITIALIZE AND STORE SETTINGS
|
||||
#=================================================
|
||||
|
||||
# fr -> fr-FR
|
||||
language="${language}-${language^^}"
|
||||
ynh_app_setting_set --app="$app" --key="language" --value="$language"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
@ -18,7 +22,48 @@ ynh_script_progression --message="Setting up source files..." --weight=2
|
|||
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
# setup page tries to access https://$domain$path/.env and fails on self signed certs
|
||||
ynh_replace_string --target_file="$install_dir/app/Http/Controllers/SettingsController.php" \
|
||||
--match_string="->get(URL::to('.env'))" \
|
||||
--replace_string="->withoutVerifying()->get(URL::to('.env'))"
|
||||
|
||||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding $app's configuration file..." --weight=1
|
||||
|
||||
app_key=""
|
||||
ynh_add_config --template="snipeit.env" --destination="$install_dir/.env"
|
||||
|
||||
chmod 600 "$install_dir/.env"
|
||||
chown "$app:$app" "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# BUILDING
|
||||
#=================================================
|
||||
ynh_script_progression --message="Building $app..."
|
||||
|
||||
ynh_install_composer
|
||||
|
||||
# setup application config
|
||||
pushd "$install_dir"
|
||||
ynh_exec_as "$app" "php$phpversion" artisan key:generate -n --force --env
|
||||
ynh_exec_as "$app" "php$phpversion" artisan migrate -n --force
|
||||
ynh_exec_as "$app" "php$phpversion" artisan config:clear -n
|
||||
ynh_exec_as "$app" "php$phpversion" artisan config:cache -n
|
||||
popd
|
||||
|
||||
app_key="$(grep "^APP_KEY=" "$install_dir/.env" | cut -d= -f2)"
|
||||
ynh_app_setting_set --app="$app" --key="app_key" --value="$app_key"
|
||||
ynh_store_file_checksum --file="$install_dir/.env"
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chmod -R 755 "$install_dir/storage"
|
||||
chmod -R 755 "$install_dir/public/uploads"
|
||||
|
||||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
|
@ -29,44 +74,6 @@ ynh_add_fpm_config
|
|||
|
||||
ynh_add_nginx_config
|
||||
|
||||
ynh_install_composer
|
||||
|
||||
#=================================================
|
||||
# APP INITIAL CONFIGURATION
|
||||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
app_key=""
|
||||
ynh_add_config --template="snipeit.env" --destination="$install_dir/.env"
|
||||
|
||||
chmod 600 "$install_dir/.env"
|
||||
chown $app:$app "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# BUILDING
|
||||
#=================================================
|
||||
ynh_script_progression --message="Building..."
|
||||
|
||||
# setup application config
|
||||
pushd "$install_dir"
|
||||
php$phpversion artisan key:generate -n --force --env
|
||||
php$phpversion artisan migrate -n --force
|
||||
php$phpversion artisan config:clear -n
|
||||
php$phpversion artisan config:cache -n
|
||||
popd
|
||||
|
||||
app_key="$(grep "^APP_KEY=" "$install_dir/.env" | cut -d= -f2)"
|
||||
ynh_app_setting_set --app=$app --key=app_key --value=$app_key
|
||||
ynh_store_file_checksum --file="$install_dir/.env"
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:www-data $install_dir
|
||||
chmod -R o-rwx $install_dir
|
||||
chmod -R 755 $install_dir/storage
|
||||
chmod -R 755 $install_dir/public/uploads
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
@ -18,14 +16,14 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
|||
ynh_restore_file --origin_path="$install_dir"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the MySQL database..."
|
||||
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEM CONFIGURATIONS
|
||||
|
@ -36,14 +34,12 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
|||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
|
||||
ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
@ -9,14 +7,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
|
@ -28,21 +18,59 @@ if [ -z "$app_key" ]; then
|
|||
ynh_app_setting_set --app=$app --key=app_key --value=$app_key
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN COMPOSER BUILD...)
|
||||
if (( ${#language} == 2 )); then
|
||||
# fr -> fr-FR
|
||||
language="${language}-${language^^}"
|
||||
ynh_app_setting_set --app="$app" --key="language" --value="$language"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=7
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep=".env storage/oauth-private.key storage/oauth-public.key storage/private_uploads public/uploads"
|
||||
fi
|
||||
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
# setup page tries to access https://$domain$path/.env and fails on self signed certs
|
||||
ynh_replace_string --target_file="$install_dir/app/Http/Controllers/SettingsController.php" \
|
||||
--match_string="->get(URL::to('.env'))" \
|
||||
--replace_string="->withoutVerifying()->get(URL::to('.env'))"
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..."
|
||||
|
||||
ynh_backup_if_checksum_is_different --file="$install_dir/.env"
|
||||
|
||||
# Recalculate and store the checksum of the file for the next upgrade.
|
||||
ynh_store_file_checksum --file="$install_dir/.env"
|
||||
# XXX: Regenerate .env instead ?
|
||||
# ynh_add_config --template="snipeit.env" --destination="$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# BUILDING
|
||||
#=================================================
|
||||
ynh_script_progression --message="Building $app..."
|
||||
|
||||
ynh_install_composer
|
||||
|
||||
ynh_exec_warn_less ynh_composer_exec --commands="dump-autoload"
|
||||
|
||||
pushd "$install_dir"
|
||||
ynh_exec_as "$app" "php$phpversion" artisan migrate -n --force
|
||||
ynh_exec_as "$app" "php$phpversion" artisan config:clear -n
|
||||
ynh_exec_as "$app" "php$phpversion" artisan config:cache -n
|
||||
popd
|
||||
|
||||
# Set permissions on app files
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chmod -R 755 "$install_dir/storage"
|
||||
chmod -R 755 "$install_dir/public/uploads"
|
||||
|
||||
#=================================================
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
|
@ -53,43 +81,6 @@ ynh_add_fpm_config
|
|||
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# INSTALL AND INITIALIZE COMPOSER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing Composer..." --weight=15
|
||||
|
||||
ynh_install_composer
|
||||
|
||||
ynh_exec_warn_less ynh_composer_exec --commands="dump-autoload"
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..."
|
||||
|
||||
ynh_backup_if_checksum_is_different --file="$install_dir/.env"
|
||||
# Recalculate and store the checksum of the file for the next upgrade.
|
||||
ynh_store_file_checksum --file="$install_dir/.env"
|
||||
# XXX: Regenerate .env instead ?
|
||||
# ynh_add_config --template="snipeit.env" --destination="$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# BUILDING
|
||||
#=================================================
|
||||
ynh_script_progression --message="Building..."
|
||||
|
||||
pushd "$install_dir"
|
||||
php$phpversion artisan migrate -n --force
|
||||
php$phpversion artisan config:clear -n
|
||||
php$phpversion artisan config:cache -n
|
||||
popd
|
||||
|
||||
# Set permissions on app files
|
||||
chown -R $app:www-data $install_dir
|
||||
chmod -R o-rwx $install_dir
|
||||
chmod -R 755 $install_dir/storage
|
||||
chmod -R 755 $install_dir/public/uploads
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue