Add better documentation and scripts for air-gapped deployment
Created new helper scripts: - quickstart-airgap.sh: One-command deployment for restricted environments - check-ready.sh: Validates that pre-built files exist before deployment Updated documentation: - Enhanced Dockerfile.frontend.prebuilt with clearer error messages - Updated DEPLOYMENT.md with step-by-step quick start guide - Updated README.md to distinguish standard vs air-gapped deployment Key improvements: - Clear warning that build must happen BEFORE docker-compose - Helper script that combines build + deployment steps - Readiness check to catch missing pre-built files early - Better instructions for test environments with restricted npm access This addresses the common error where Docker fails because frontend/dist/frontend/browser doesn't exist yet. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -24,12 +24,12 @@ This uses `Dockerfile.frontend` which:
|
||||
|
||||
---
|
||||
|
||||
## Option 2: Pre-built Deployment (Air-Gapped/Restricted Environments)
|
||||
## Option 2: Pre-built Deployment (Air-Gapped/Restricted Environments) ⭐ RECOMMENDED
|
||||
|
||||
Use `Dockerfile.frontend.prebuilt` for environments with restricted npm access.
|
||||
|
||||
**Requirements:**
|
||||
- Node.js 18+ installed locally
|
||||
- Node.js 18+ installed locally (on a machine with npm access)
|
||||
- npm installed locally
|
||||
- No internet required during Docker build
|
||||
|
||||
@@ -37,14 +37,34 @@ Use `Dockerfile.frontend.prebuilt` for environments with restricted npm access.
|
||||
|
||||
**Usage:**
|
||||
|
||||
### Step 1: Build Angular app locally
|
||||
### Quick Start (Recommended)
|
||||
```bash
|
||||
./quickstart-airgap.sh
|
||||
```
|
||||
|
||||
This script will:
|
||||
1. Build the Angular app locally
|
||||
2. Start all Docker containers
|
||||
3. Verify the deployment
|
||||
|
||||
### Manual Steps
|
||||
|
||||
### Step 1: Build Angular app locally
|
||||
**IMPORTANT:** You MUST run this step BEFORE `docker-compose up`!
|
||||
|
||||
```bash
|
||||
# Option A: Use the helper script
|
||||
./build-for-airgap.sh
|
||||
|
||||
# Option B: Build manually
|
||||
cd frontend
|
||||
npm install # Only needed once or when dependencies change
|
||||
npm run build:prod
|
||||
cd ..
|
||||
```
|
||||
|
||||
This creates `frontend/dist/frontend/browser/` which Docker will copy.
|
||||
|
||||
### Step 2: Update docker-compose.yml
|
||||
Edit `docker-compose.yml` and change the frontend dockerfile:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user