Compare commits

..

3 Commits

Author SHA1 Message Date
√(noham)²
9153dcabd2 Merge pull request #1 from basitAliAhmad/docker-support
Added support to run this server over docker.
2026-05-24 12:39:48 +02:00
Basit Ali Ahmad
b450fd09a4 Added support for docker. The server can run over docker 2026-05-13 13:25:18 +04:00
Basit Ali Ahmad
dca8ae70df Fixed API versions according to requests originating from bruno client 2026-05-13 13:24:50 +04:00
4 changed files with 37 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
venv

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# Use an official Python runtime as a parent image
FROM python:3.11.15-slim
# Set the working directory inside the container
WORKDIR /app
# Copy requirements file to image
COPY requirements.txt requirements.txt
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code into the container
COPY server.py server.py
# Make port 5000 available to the world outside this container
EXPOSE 5000
# Run the application
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "server:app"]

View File

@@ -12,7 +12,7 @@ This Flask-based server implements the license activation and verification endpo
Clone the repository and install dependencies: Clone the repository and install dependencies:
```bash ```bash
git clone https://github.com/NohamR/BrunoServer.git && cd BrunoServer git clone https://github.com/NohamR/BrunoServer.git && cd BrunoServer
pip install flask pip install -r requirements.txt
``` ```
## Usage ## Usage
@@ -42,6 +42,19 @@ To use this license server with Bruno:
- Default: `http://127.0.0.1:5000` - Default: `http://127.0.0.1:5000`
3. Use any license key for activation and any otp for verification. 3. Use any license key for activation and any otp for verification.
#### Option 3: Run Your Own over Docker
1. Create docker image:
```bash
docker build -t bruno-server .
```
2. Run docker image in container:
```bash
docker run -d --name bruno-server -p 5000:5000 bruno-server
```
3. Use the option 'License Server' from activation and enter `http://localhost:5000` as License Server URL
4. Enter any text in License Key and Email.
5. When prompted for OTP, enter any text. Bruno Ultimate will be activated.
## Legal Notice ## Legal Notice
This software is provided for educational and development purposes only. The authors do not condone piracy or license violations. This software is provided for educational and development purposes only. The authors do not condone piracy or license violations.

View File

@@ -30,7 +30,7 @@ def _make_jwt_like(payload: dict) -> str:
return f"{header_b64}.{payload_b64}.{signature_b64}" return f"{header_b64}.{payload_b64}.{signature_b64}"
@app.route("/api/v1/license/activate", methods=["POST"]) @app.route("/api/v2/license/activate", methods=["POST"])
def activate_license(): def activate_license():
"""Handle license activation request.""" """Handle license activation request."""
payload = request.get_json(silent=True) or {} payload = request.get_json(silent=True) or {}
@@ -101,7 +101,7 @@ def verify_activation_otp(activation_id: str):
}), 200 }), 200
@app.route("/api/v1/license/verify", methods=["POST"]) @app.route("/api/v2/license/verify", methods=["POST"])
def verify_license(): def verify_license():
"""Verify license token.""" """Verify license token."""
payload = request.get_json(silent=True) or {} payload = request.get_json(silent=True) or {}