build(docker): add docker-compose.dev.yml and update docker-compose.yml

Add development docker-compose configuration and switch production config to use pre-built image
docs: update README with improved setup instructions and new features
This commit is contained in:
abdullahalam123
2025-10-17 21:27:25 +05:30
parent cc83d7951f
commit d98e18b51f
3 changed files with 83 additions and 49 deletions

View File

@@ -1,10 +1,12 @@
# BentoPDF # BentoPDF
![Docker Pulls](https://img.shields.io/docker/pulls/bentopdf/bentopdf)
[![Ko-fi](https://img.shields.io/badge/Buy%20me%20a%20Coffee-yellow?logo=kofi&style=flat-square)](https://ko-fi.com/alio0)
**BentoPDF** is a powerful, privacy-first, client-side PDF toolkit that allows you to manipulate, edit, merge, and process PDF files directly in your browser. No server-side processing is required, ensuring your files remain secure and private. **BentoPDF** is a powerful, privacy-first, client-side PDF toolkit that allows you to manipulate, edit, merge, and process PDF files directly in your browser. No server-side processing is required, ensuring your files remain secure and private.
![Docker Pulls](https://img.shields.io/docker/pulls/bentopdf/bentopdf) [![Ko-fi](https://img.shields.io/badge/Buy%20me%20a%20Coffee-yellow?logo=kofi&style=flat-square)](https://ko-fi.com/alio0) ![GitHub Stars](https://img.shields.io/github/stars/alam00000/bentopdf?style=social)
## ⭐ Stargazers over time
[![Star History Chart](https://api.star-history.com/svg?repos=alam00000/bentopdf&type=Date)](https://star-history.com/#alam00000/bentopdf&Date)
--- ---
## ✨ Why BentoPDF? ## ✨ Why BentoPDF?
@@ -91,19 +93,45 @@ You can run BentoPDF locally for development or personal use.
- [npm](https://www.npmjs.com/) (or yarn/pnpm) - [npm](https://www.npmjs.com/) (or yarn/pnpm)
- [Docker](https://www.docker.com/) & [Docker Compose](https://docs.docker.com/compose/install/) (for containerized setup) - [Docker](https://www.docker.com/) & [Docker Compose](https://docs.docker.com/compose/install/) (for containerized setup)
### 🚀 Run BentoPDF with Docker (Quick Start) ### 🚀 Quick Start with Docker
You can run BentoPDF directly from Docker Hub without cloning the repository: You can run BentoPDF directly from Docker Hub without cloning the repository:
```bash ```bash
docker pull bentopdf/bentopdf:latest
docker run -p 3000:80 bentopdf/bentopdf:latest docker run -p 3000:80 bentopdf/bentopdf:latest
``` ```
Open your browser at: http://localhost:3000. Open your browser at: http://localhost:3000
This is the fastest way to try BentoPDF without setting up a development environment. This is the fastest way to try BentoPDF without setting up a development environment.
### 🚀 Installation with npm ### 🚀 Run with Docker Compose (Recommended)
For a more robust setup with auto-restart capabilities:
1. **Create a `docker-compose.yml` file or use the one given in repo**:
```yaml
services:
bentopdf:
image: bentopdf/bentopdf:latest
container_name: bentopdf
ports:
- '3000:80'
restart: unless-stopped
```
2. **Start the application**:
```bash
docker-compose up -d
```
The application will be available at `http://localhost:3000`.
### 🚀 Development Setup
#### Option 1: Run with npm
1. **Clone the Repository**: 1. **Clone the Repository**:
@@ -124,7 +152,7 @@ This is the fastest way to try BentoPDF without setting up a development environ
``` ```
The application will be available at `http://localhost:5173`. The application will be available at `http://localhost:5173`.
### 🚀 Running with Docker Compose Locally #### Option 2: Build and Run with Docker Compose
1. **Clone the Repository**: 1. **Clone the Repository**:
@@ -134,21 +162,20 @@ This is the fastest way to try BentoPDF without setting up a development environ
``` ```
2. **Run with Docker Compose**: 2. **Run with Docker Compose**:
Create a `docker-compose.yml` file with the content provided in the repository or use the existing one. Then, run:
```bash ```bash
docker-compose up -d docker-compose -f docker-compose.dev.yml up -d
``` ```
The application will be available at `http://localhost:3000`. The application will be available at `http://localhost:3000`.
> **Note:** After making any local changes to the code, its recommended to rebuild the Docker image using: > **Note:** After making any local changes to the code, rebuild the Docker image using:
```bash ```bash
docker-compose up --build -d docker-compose -f docker-compose.dev.yml up --build -d
``` ```
This ensures your latest changes are applied inside the container This ensures your latest changes are applied inside the container.
--- ---
@@ -174,6 +201,8 @@ BentoPDF was originally built using **HTML**, **CSS**, and **vanilla JavaScript*
- **Convert to PDF/A**: Convert PDFs to the PDF/A archival format. - **Convert to PDF/A**: Convert PDFs to the PDF/A archival format.
- **Edit PDF Content**: Directly edit text and other content within your PDF. - **Edit PDF Content**: Directly edit text and other content within your PDF.
- **Linearize PDF**: Optimize PDFs for fast web viewing. - **Linearize PDF**: Optimize PDFs for fast web viewing.
- **PDF to Office**: Converts PDF files into editable Word, Excel, and PowerPoint formats.
- **Office to PDF**: Converts Word, Excel, and PowerPoint documents into optimized PDFs.
Contributions and discussions on the roadmap are welcome! Join the conversation via [Discord](https://discord.gg/q42xWQmJ). Contributions and discussions on the roadmap are welcome! Join the conversation via [Discord](https://discord.gg/q42xWQmJ).
@@ -181,7 +210,7 @@ Contributions and discussions on the roadmap are welcome! Join the conversation
## 🤝 Contributing ## 🤝 Contributing
We welcome contributions from the community! Heres how you can get started: We welcome contributions from the community! Here's how you can get started:
1. **Fork the repository** and create your branch from `main`. 1. **Fork the repository** and create your branch from `main`.
2. Follow the **Getting Started** steps to set up your local environment. 2. Follow the **Getting Started** steps to set up your local environment.
@@ -194,7 +223,7 @@ Have an idea for a new tool or an improvement? [Open an issue](https://github.co
## Special Thanks ## Special Thanks
BentoPDF wouldnt be possible without the amazing open-source tools and libraries that power it. Wed like to extend our heartfelt thanks to the creators and maintainers of: BentoPDF wouldn't be possible without the amazing open-source tools and libraries that power it. We'd like to extend our heartfelt thanks to the creators and maintainers of:
- **[PDFLib.js](https://pdf-lib.js.org/)** For enabling powerful client-side PDF manipulation. - **[PDFLib.js](https://pdf-lib.js.org/)** For enabling powerful client-side PDF manipulation.
- **[PDF.js](https://mozilla.github.io/pdf.js/)** For the robust PDF rendering engine in the browser. - **[PDF.js](https://mozilla.github.io/pdf.js/)** For the robust PDF rendering engine in the browser.

9
docker-compose.dev.yml Normal file
View File

@@ -0,0 +1,9 @@
services:
bentopdf:
build:
context: .
dockerfile: Dockerfile
container_name: bentopdf
ports:
- '3000:80'
restart: unless-stopped

View File

@@ -1,11 +1,7 @@
version: '3.8'
services: services:
bentopdf: bentopdf:
build: image: bentopdf/bentopdf:latest
context: .
dockerfile: Dockerfile
container_name: bentopdf container_name: bentopdf
ports:
- '3000:80'
restart: unless-stopped restart: unless-stopped
ports:
- "3000:80"