1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/snipeit_ynh.git synced 2024-09-03 20:26:16 +02:00
* set relative path to keep option

* Auto-update README

* Manifest v2 and upgrade to v6.1.0 (#34)

* convert to v2

* cleanup and example_ynh

* Update

* Update

* Auto-update README

* Update tests.toml

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* Auto-update README

* cleaning

* Auto-update README

* cleaning

* Auto-update README

* fix linter

* Auto-update README

* cleaning

* Update backup

* Update manifest.toml

* Update snipeit.env

* Update manifest.toml

* Revert "Update manifest.toml"

This reverts commit 2ece2825a5.

* Upgrade to v6.3.0 (#39)

* Upgrade to v6.3.0

* Auto-update README

* Upgrade to v6.3.1

* Auto-update README

* Mail (#37)

* Update snipeit.env

* Update manifest.toml

* Update manifest.toml

* fix

* Update tests.toml

* cleaning

* Auto-update README

* Update change_url

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* Auto-update README

* fix

* add php

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: Tagada <36127788+Tagadda@users.noreply.github.com>
Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: OniriCorpe <oniricorpe@disroot.org>
This commit is contained in:
eric_G 2024-02-29 16:09:48 +01:00 committed by GitHub
parent 67515f6c89
commit eb59d1b6ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 56 additions and 24 deletions

View file

@ -1,5 +1,5 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/readme_generator
It shall NOT be edited by hand.
-->
@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
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.3.0~ynh1
**Shipped version:** 6.3.1~ynh1
**Demo:** https://snipeitapp.com/demo/
@ -47,4 +47,4 @@ or
sudo yunohost app upgrade snipeit -u https://github.com/YunoHost-Apps/snipeit_ynh/tree/testing --debug
```
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,5 +1,5 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/readme_generator
It shall NOT be edited by hand.
-->
@ -18,7 +18,7 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
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.3.0~ynh1
**Version incluse :** 6.3.1~ynh1
**Démo :** https://snipeitapp.com/demo/

4
conf/extra_php-fpm.conf Normal file
View file

@ -0,0 +1,4 @@
; Additional php.ini defines, specific to this pool of workers.
php_admin_value[upload_max_filesize] = 50M
php_admin_value[post_max_size] = 50M

View file

@ -7,7 +7,7 @@ location ^~ __PATH__/ {
index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
#client_max_body_size 50M;
client_max_body_size 50M;
try_files $uri $uri/ @snipe;
location ~ \.php {

View file

@ -48,12 +48,12 @@ DB_SSL_CIPHER=null
MAIL_DRIVER=mail
MAIL_HOST=127.0.0.1
MAIL_PORT=25
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_USERNAME=__APP__
MAIL_PASSWORD=__MAIL_PWD__
MAIL_ENCRYPTION=null
MAIL_FROM_ADDR=snipeit@__DOMAIN__
MAIL_FROM_ADDR=__APP__@__DOMAIN__
MAIL_FROM_NAME='Snip-IT'
MAIL_REPLYTO_ADDR=snipeit@__DOMAIN__
MAIL_REPLYTO_ADDR=__APP__@__DOMAIN__
MAIL_REPLYTO_NAME='Snipe-IT'
MAIL_AUTO_EMBED_METHOD='attachment'

View file

@ -5,7 +5,7 @@ name = "Snipe-IT"
description.en = "Manage assets for IT operations"
description.fr = "Gestionnaire de ressources informatiques"
version = "6.3.0~ynh1"
version = "6.3.1~ynh1"
maintainers = []
@ -23,8 +23,11 @@ fund = "https://snipeitapp.com/donate"
yunohost = ">= 11.2"
architectures = "all"
multi_instance = false
ldap = false
sso = false
disk = "200M"
ram.build = "150M"
ram.runtime = "50M"
@ -47,11 +50,12 @@ ram.runtime = "50M"
[resources]
[resources.sources]
[resources.sources.main]
url = "https://github.com/snipe/snipe-it/archive/refs/tags/v6.3.0.tar.gz"
sha256 = "a27fcde775d78401b1eefabf68c3842a3640989636fb26238d3a4ed94758a6d9"
url = "https://github.com/snipe/snipe-it/archive/refs/tags/v6.3.1.tar.gz"
sha256 = "7ff56b93cd7609b390e8521dc843841a433dbbce079123fb26bf7519baab8014"
autoupdate.strategy = "latest_github_tag"
[resources.system_user]
allow_email = true
[resources.install_dir]

View file

@ -7,6 +7,7 @@
# Packages requirements: https://snipe-it.readme.io/docs/requirements
YNH_COMPOSER_VERSION=2.5.8
timezone=$(cat /etc/timezone)
#=================================================

30
scripts/change_url Normal file
View file

@ -0,0 +1,30 @@
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
ynh_change_url_nginx_config
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
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
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --last

View file

@ -25,13 +25,10 @@ chown -R $app:www-data "$install_dir"
#=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config using the conf/php-fpm.conf or conf/extra_php-fpm.conf
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config
# Create a dedicated NGINX config
ynh_add_nginx_config
# Install composer
ynh_install_composer
#=================================================

View file

@ -14,10 +14,8 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the dedicated NGINX config
ynh_remove_nginx_config
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
#=================================================

View file

@ -49,10 +49,8 @@ chown -R $app:www-data "$install_dir"
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
@ -60,7 +58,6 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Installing Composer..." --weight=15
# Install composer
ynh_install_composer
ynh_exec_warn_less ynh_composer_exec --commands="dump-autoload"

View file

@ -2,9 +2,10 @@ test_format = 1.0
[default]
exclude = ["install.subdir", "install.nourl", "change_url"]
exclude = ["install.subdir"]
test_upgrade_from.ebf4c0a.name = "Upgrade from 5.3.1~ynh3 (manifest v1)"
test_upgrade_from.ebf4c0a.args.domain="domain.tld"
test_upgrade_from.ebf4c0a.args.is_public=1
test_upgrade_from.ebf4c0a.args.language="fr"