2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

[0.16.x] Packager: easier to parse debug messages (#8083) (#8096)

* Packager: easier to parse debug messages (#8083)

* Add new version to logging

* Add easier to search logging

* shorten appended string

* make migrations that run on fresh installs easier to read

(cherry picked from commit 3d9db2543d)

# Conflicts:
#	contrib/packager.io/functions.sh
#	contrib/packager.io/preinstall.sh

* Update contributing.md
This commit is contained in:
Matthias Mair
2024-09-09 12:17:13 +02:00
committed by GitHub
parent d46505671f
commit 89be7f2699
6 changed files with 99 additions and 73 deletions

View File

@ -3,12 +3,15 @@
# packager.io postinstall script
#
echo "# POI01| Running postinstall script - start - $(date)"
exec > >(tee ${APP_HOME}/log/setup_$(date +"%F_%H_%M_%S").log) 2>&1
PATH=${APP_HOME}/env/bin:${APP_HOME}/:/sbin:/bin:/usr/sbin:/usr/bin:
# import functions
echo "# POI01| Importing functions"
. ${APP_HOME}/contrib/packager.io/functions.sh
echo "# POI01| Functions imported"
# Envs that should be passed to setup commands
export SETUP_ENVS=PATH,APP_HOME,INVENTREE_MEDIA_ROOT,INVENTREE_STATIC_ROOT,INVENTREE_BACKUP_DIR,INVENTREE_SITE_URL,INVENTREE_PLUGINS_ENABLED,INVENTREE_PLUGIN_FILE,INVENTREE_CONFIG_FILE,INVENTREE_SECRET_KEY_FILE,INVENTREE_DB_ENGINE,INVENTREE_DB_NAME,INVENTREE_DB_USER,INVENTREE_DB_PASSWORD,INVENTREE_DB_HOST,INVENTREE_DB_PORT,INVENTREE_ADMIN_USER,INVENTREE_ADMIN_EMAIL,INVENTREE_ADMIN_PASSWORD,SETUP_NGINX_FILE,SETUP_ADMIN_PASSWORD_FILE,SETUP_NO_CALLS,SETUP_DEBUG,SETUP_EXTRA_PIP,SETUP_PYTHON,SETUP_ADMIN_NOCREATION
@ -37,9 +40,9 @@ detect_ip
detect_python
# Check if we are updating and need to alert
echo "# Checking if update checks are needed"
echo "# POI08| Checking if update checks are needed"
if [ -z "$2" ]; then
echo "# Normal install - no need for checks"
echo "# POI08| Normal install - no need for checks"
else
update_checks $2
fi
@ -60,3 +63,4 @@ start_inventree
# show info
final_message
echo "# POI17| Running postinstall script - done - $(date)"