- Restore original HTTPS config in docker-compose files (gunicorn + gevent DOES support SSL) - Add plugin migration step to docker-entrypoint.sh (fixes missing plugin tables on first deploy) - Install only core plugins on bootstrap (backups, computers, endpoints, guides, knowledgebase, machines, network, notifications, printers, slides, tools, warranty) - Set FLASK_ENV=production to disable Werkzeug debugger Bug: bootstrap-plugins.sh installed ALL plugins but didn't run migrations, causing 'Table does not exist' errors. Now installs core plugins only and runs 'flask plugin upgrade-all' after bootstrap. Optional plugins (employees, geenforce, measuringtools, printedparts, usb) can be installed later via Settings > Plugins. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
29 lines
1.0 KiB
Bash
29 lines
1.0 KiB
Bash
#!/bin/bash
|
|
# Bootstrap plugin installation on first deployment.
|
|
# Installs all available plugins but leaves them disabled, so admins can
|
|
# enable what they need via Settings UI. Idempotent: safe to run multiple times.
|
|
|
|
set -e
|
|
|
|
REGISTRY_FILE="/app/instance/plugins.json"
|
|
|
|
if [ ! -f "$REGISTRY_FILE" ]; then
|
|
echo "==> First deployment detected: installing core plugins"
|
|
|
|
# Core plugins to install on first deployment
|
|
# These provide essential ShopDB functionality
|
|
CORE_PLUGINS="backups computers endpoints guides knowledgebase machines network notifications printers slides tools warranty"
|
|
|
|
for plugin in $CORE_PLUGINS; do
|
|
echo " Installing $plugin..."
|
|
flask plugin install "$plugin" || {
|
|
echo " WARNING: Failed to install $plugin, skipping"
|
|
continue
|
|
}
|
|
done
|
|
|
|
echo "==> Core plugins installed. Additional plugins (employees, geenforce, measuringtools, printedparts, usb) can be installed via Settings > Plugins"
|
|
else
|
|
echo "==> Plugin registry exists, skipping bootstrap"
|
|
fi
|