feat: make Docker container port configurable via PORT env var

fix: preserve original filename when downloading processed files
This commit is contained in:
alam00000
2026-04-05 13:44:16 +05:30
parent 2f0d48c01b
commit bfe4e5b663
77 changed files with 127 additions and 126 deletions

View File

@@ -890,7 +890,7 @@ For the full list of editor categories, see the [self-hosting docs](https://bent
BentoPDF runs as a non-root user using nginx-unprivileged for enhanced security:
- **Non-Root Execution**: Container runs with minimal privileges using nginx-unprivileged
- **Port 8080**: Uses high port number to avoid requiring root privileges
- **Port 8080**: Uses high port number to avoid requiring root privileges (configurable via `PORT` env var)
- **Security Best Practices**: Follows Principle of Least Privilege
#### Basic Usage
@@ -900,6 +900,18 @@ docker build -t bentopdf .
docker run -p 8080:8080 bentopdf
```
#### Custom Port
By default, BentoPDF listens on port `8080` inside the container. To change this, set the `PORT` environment variable:
```bash
docker run -p 3000:9090 -e PORT=9090 ghcr.io/alam00000/bentopdf:latest
```
| Variable | Description | Default |
| -------- | ------------------------------ | ------- |
| `PORT` | Nginx listen port in container | `8080` |
#### Custom User ID (PUID/PGID)
For environments that require running as a specific non-root user (e.g., NAS devices, Kubernetes with security contexts), use the non-root Dockerfile: