Reorganize project structure: move docs and scripts to proper directories
Changes:
- Created scripts/ directory for build and utility scripts
- Moved build-for-airgap.sh to scripts/
- Moved check-ready.sh to scripts/
- Kept quickstart scripts in root for easy access
- Moved HELM-DEPLOYMENT.md to docs/
Updated references:
- README.md: Updated link to docs/HELM-DEPLOYMENT.md
- docs/DEPLOYMENT.md: Updated paths to scripts/build-for-airgap.sh
- quickstart-airgap.sh: Updated path to scripts/build-for-airgap.sh
- scripts/check-ready.sh: Updated self-reference path
- helm/warehouse13/QUICKSTART.md: Updated HELM-DEPLOYMENT.md path
- helm/README.md: Updated HELM-DEPLOYMENT.md path
Directory structure now:
/
├── README.md (root)
├── quickstart.sh (root - easy access)
├── quickstart-airgap.sh (root - easy access)
├── docs/ (all documentation)
│ ├── API.md
│ ├── ARCHITECTURE.md
│ ├── DEPLOYMENT.md
│ ├── FEATURES.md
│ ├── FRONTEND_SETUP.md
│ ├── HELM-DEPLOYMENT.md (moved here)
│ └── SUMMARY.md
├── scripts/ (build and utility scripts)
│ ├── build-for-airgap.sh (moved here)
│ └── check-ready.sh (moved here)
└── helm/
└── warehouse13/ (Helm chart with docs)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
70
scripts/build-for-airgap.sh
Normal file
70
scripts/build-for-airgap.sh
Normal file
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "========================================="
|
||||
echo "Building Angular for Air-Gapped Deployment"
|
||||
echo "========================================="
|
||||
echo ""
|
||||
|
||||
# Check if we're in the right directory
|
||||
if [ ! -f "docker-compose.yml" ]; then
|
||||
echo "Error: Must run from project root directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if node is installed
|
||||
if ! command -v node &> /dev/null; then
|
||||
echo "Error: Node.js is not installed. Please install Node.js 24+ first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if npm is installed
|
||||
if ! command -v npm &> /dev/null; then
|
||||
echo "Error: npm is not installed. Please install npm first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Step 1/3: Installing dependencies..."
|
||||
cd frontend
|
||||
npm install
|
||||
|
||||
echo ""
|
||||
echo "Step 2/3: Building Angular production bundle..."
|
||||
npm run build:prod
|
||||
|
||||
echo ""
|
||||
echo "Step 3/3: Copying to static directory..."
|
||||
if [ -d "dist/frontend/browser" ]; then
|
||||
echo "✓ Build successful!"
|
||||
echo "✓ Output: frontend/dist/frontend/browser"
|
||||
|
||||
# Copy to static directory for local FastAPI serving
|
||||
cd ..
|
||||
rm -rf static/*
|
||||
cp -r frontend/dist/frontend/browser/* static/
|
||||
echo "✓ Copied to static/ directory"
|
||||
|
||||
ls -lh static/ | head -10
|
||||
else
|
||||
echo "✗ Build failed - output directory not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "========================================="
|
||||
echo "Build Complete!"
|
||||
echo "========================================="
|
||||
echo ""
|
||||
echo "The Angular app has been built and copied to static/"
|
||||
echo "You can now:"
|
||||
echo ""
|
||||
echo "1. Run locally with FastAPI:"
|
||||
echo " uvicorn app.main:app --reload"
|
||||
echo " Access at: http://localhost:8000"
|
||||
echo ""
|
||||
echo "2. Deploy with Docker:"
|
||||
echo " docker-compose up -d --build"
|
||||
echo " (Docker will rebuild Angular during build)"
|
||||
echo ""
|
||||
echo "========================================="
|
||||
Reference in New Issue
Block a user