Build [v1.9.5] (Bulletproof Deployment with visible inventory.env and deploy.sh)

This commit is contained in:
Daniel Bedeleanu
2026-04-13 21:32:49 +03:00
parent a0eaddf994
commit 7c3d0e102f
7 changed files with 54 additions and 10 deletions

25
deploy.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
# deploy.sh - Production Deployment Script for TFM aInventory
# Forces Docker Compose to use the inventory.env file for both host and container.
echo "🐳 TFM aInventory - Starting Deployment..."
# 1. Check for configuration file
if [ ! -f "inventory.env" ]; then
echo "❌ ERROR: inventory.env not found!"
echo "Please create it or use the template provided."
exit 1
fi
# 2. Source the env file for the current shell (helps some docker versions)
export $(grep -v '^#' inventory.env | xargs)
# 3. Run Docker Compose with explicit env-file flag
echo "🚀 Building and starting containers..."
docker compose --env-file inventory.env up -d --build --remove-orphans
echo ""
echo "✅ Deployment requested."
echo " Access URL: https://${SERVER_IP:-localhost}:${FRONTEND_SSL_PORT:-8919}"
echo " Run 'docker compose ps' to check status."
echo ""