| echo "π Stopping and removing old container if it exists..." | |
| docker stop agentic-dashboard 2>/dev/null && docker rm agentic-dashboard 2>/dev/null | |
| echo "π§Ό Cleaning Docker build cache (legacy fallback)..." | |
| docker builder prune --all --force || true | |
| echo "βοΈ Rebuilding Docker image (no cache)..." | |
| docker build -t agentic-dashboard . --no-cache | |
| echo "π Launching new container..." | |
| docker run -d \ | |
| -p 7860:5000 \ | |
| -e STATIC_FILES_DIR=/app/static \ | |
| --name agentic-dashboard \ | |
| agentic-dashboard | |
| echo "β³ Waiting 5 seconds for container to initialize..." | |
| sleep 5 | |
| echo "π Showing last 20 log lines..." | |
| docker logs --tail=20 agentic-dashboard | |
| echo "β DONE. Visit http://137.184.173.199:7860 in your browser" | |