updated SIMPLE_MODE.md
This commit is contained in:
@@ -19,40 +19,67 @@ When enabled, Simple Mode will:
|
|||||||
|
|
||||||
## How to Enable Simple Mode
|
## How to Enable Simple Mode
|
||||||
|
|
||||||
### Using Docker Compose
|
### Method 1: Using Pre-built Simple Mode Image (Recommended)
|
||||||
|
|
||||||
1. Create a `.env` file in your project root:
|
Use the pre-built Simple Mode image directly:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
SIMPLE_MODE=true
|
docker run -p 3000:80 bentopdf/bentopdf-simple:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Run with docker-compose:
|
Or with Docker Compose:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
bentopdf:
|
||||||
|
image: bentopdf/bentopdf-simple:latest
|
||||||
|
container_name: bentopdf
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- '3000:80'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Method 2: Using Docker Compose with Build
|
||||||
|
|
||||||
|
Build the image locally with Simple Mode enabled:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose up -d
|
docker compose -f docker-compose.dev.yml build --build-arg SIMPLE_MODE=true
|
||||||
|
docker compose -f docker-compose.dev.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using Docker Build
|
### Method 3: Using Docker Build
|
||||||
|
|
||||||
Build the image with the SIMPLE_MODE environment variable:
|
Build the image with the SIMPLE_MODE build argument:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build --build-arg SIMPLE_MODE=true -t bentopdf-simple .
|
docker build --build-arg SIMPLE_MODE=true -t bentopdf-simple .
|
||||||
|
docker run -p 3000:80 bentopdf-simple
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using Environment Variables
|
### Method 4: Using Environment Variables
|
||||||
|
|
||||||
Set the environment variable before building:
|
Set the environment variable before building:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export SIMPLE_MODE=true
|
export SIMPLE_MODE=true
|
||||||
npm run build
|
npm run build
|
||||||
|
npx serve dist -p 3000
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🧪 Testing Simple Mode Locally
|
## 🧪 Testing Simple Mode Locally
|
||||||
|
|
||||||
After building with Simple Mode enabled, you need to serve the built files locally.
|
### Method 1: Using Pre-built Image (Easiest)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Pull and run the Simple Mode image
|
||||||
|
docker pull bentopdf/bentopdf-simple:latest
|
||||||
|
docker run -p 3000:80 bentopdf/bentopdf-simple:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
Open `http://localhost:3000` in your browser.
|
||||||
|
|
||||||
|
### Method 2: Build and Test Locally
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Build with simple mode
|
# Build with simple mode
|
||||||
@@ -62,7 +89,20 @@ SIMPLE_MODE=true npm run build
|
|||||||
npx serve dist -p 3000
|
npx serve dist -p 3000
|
||||||
```
|
```
|
||||||
|
|
||||||
Then open `http://localhost:3000` in your browser.
|
Open `http://localhost:3000` in your browser.
|
||||||
|
|
||||||
|
### Method 3: Compare Both Modes
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Test Normal Mode
|
||||||
|
docker run -p 3000:80 bentopdf/bentopdf:latest
|
||||||
|
|
||||||
|
# Test Simple Mode
|
||||||
|
docker run -p 3001:80 bentopdf/bentopdf-simple:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
- Normal Mode: `http://localhost:3000`
|
||||||
|
- Simple Mode: `http://localhost:3001`
|
||||||
|
|
||||||
## 🔍 What to Look For
|
## 🔍 What to Look For
|
||||||
|
|
||||||
@@ -76,8 +116,19 @@ When Simple Mode is working correctly, you should see:
|
|||||||
- ❌ No hero section with "The PDF Toolkit built for privacy"
|
- ❌ No hero section with "The PDF Toolkit built for privacy"
|
||||||
- ❌ No features, FAQ, testimonials, or footer sections
|
- ❌ No features, FAQ, testimonials, or footer sections
|
||||||
|
|
||||||
## Example Docker Compose Configuration
|
## 📦 Available Docker Images
|
||||||
|
|
||||||
|
### Normal Mode (Full Branding)
|
||||||
|
- `bentopdf/bentopdf:latest`
|
||||||
|
- `bentopdf/bentopdf:v1.0.0` (versioned)
|
||||||
|
|
||||||
|
### Simple Mode (Clean Interface)
|
||||||
|
- `bentopdf/bentopdf-simple:latest`
|
||||||
|
- `bentopdf/bentopdf-simple:v1.0.0` (versioned)
|
||||||
|
|
||||||
|
## 🚀 Production Deployment Examples
|
||||||
|
|
||||||
|
### Internal Company Tool
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
bentopdf:
|
bentopdf:
|
||||||
@@ -85,7 +136,17 @@ services:
|
|||||||
container_name: bentopdf
|
container_name: bentopdf
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- '3000:80'
|
- "80:80"
|
||||||
environment:
|
environment:
|
||||||
- SIMPLE_MODE=true
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## ⚠️ Important Notes
|
||||||
|
|
||||||
|
- **Pre-built images**: Use `bentopdf/bentopdf-simple:latest` for Simple Mode
|
||||||
|
- **Environment variables**: `SIMPLE_MODE=true` only works during build, not runtime
|
||||||
|
- **Build-time optimization**: Simple Mode uses dead code elimination for smaller bundles
|
||||||
|
- **Same functionality**: All PDF tools work identically in both modes
|
||||||
|
|||||||
Reference in New Issue
Block a user