From 312f4d4aea9e4b95dc50291b96997c7b9efe7e30 Mon Sep 17 00:00:00 2001 From: Andrei Timar Date: Mon, 6 Apr 2026 07:26:49 +0300 Subject: [PATCH 1/3] docs: update docs about processing instances and cleanup unnecessary files --- docs/.vitepress/config.js | 2 - docs/architecture/diagram.md | 2 - docs/architecture/features.md | 33 ---------- docs/architecture/overview.md | 61 +++++++++--------- docs/architecture/rbac.md | 95 ++++++++++++++--------------- docs/home/installation.md | 65 +++++++++++++++++++- docs/home/run.md | 7 --- docs/index.md | 6 +- docs/plugins/manifest.md | 12 ++-- docs/plugins/plugin_api.md | 14 ++--- docs/scripts/first_csharp_script.md | 2 +- 11 files changed, 156 insertions(+), 143 deletions(-) delete mode 100644 docs/architecture/features.md delete mode 100644 docs/home/run.md diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index ca9ac3df..c40ec10b 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -20,7 +20,6 @@ export default defineConfig({ items: [ { text: 'Introduction', link: '/' }, { text: 'Installation', link: '/home/installation' }, - { text: 'Run', link: '/home/run' }, ], }, { @@ -81,7 +80,6 @@ export default defineConfig({ items: [ { text: 'Diagram', link: '/architecture/diagram' }, { text: 'Overview', link: '/architecture/overview' }, - { text: 'Features', link: '/architecture/features' }, { text: 'RBAC', link: '/architecture/rbac' }, ], }, diff --git a/docs/architecture/diagram.md b/docs/architecture/diagram.md index 936b6051..caf99b03 100644 --- a/docs/architecture/diagram.md +++ b/docs/architecture/diagram.md @@ -1,5 +1,3 @@ # Architecture Diagram -> Work in Progress - ![architecture_diagram](../assets/ScriptBee_Architecture.png 'Architecture Diagram') diff --git a/docs/architecture/features.md b/docs/architecture/features.md deleted file mode 100644 index 3f288ecc..00000000 --- a/docs/architecture/features.md +++ /dev/null @@ -1,33 +0,0 @@ -# Features - -> Work in Progress - -## Deployment - -> All below environment variables are subject to change - -### Kubernetes - -For the Kubernetes deployment, the following environment variables need to be set - -```dotenv -FEATURES__DEPLOYMENT_CALCULATION=kubernetes -``` - -### Docker Swarm - -For the Docker swarm deployment, the following environment variables need to be set - -```dotenv -FEATURES__DEPLOYMENT_CALCULATION=docker -``` - -## Authorization - -Authorization can be disabled entirely - -> Not recommended for production - -```dotenv -FEATURES_DISABLEAUTHORIZATION=true -``` diff --git a/docs/architecture/overview.md b/docs/architecture/overview.md index 918b99d9..b624b2f7 100644 --- a/docs/architecture/overview.md +++ b/docs/architecture/overview.md @@ -1,54 +1,57 @@ -# Overview +# Overview -> Work in Progress +This section provides a high-level overview of ScriptBee's architecture and the roles of its core components. ## UI -The UI uses plugins defined by the gateway. +The User Interface provides a web-based experience for managing projects, loading data from various sources, and running analysis scripts. -The plugins can be of several types +## Gateway -### Output Type plugin +The Gateway is the central orchestration component. Its responsibilities include: -To offer different visualization of the data +- Handling UI interactions and requests. +- Managing projects and user workspaces. +- Orchestrating the lifecycle of analysis instances. -## Gateway +> [!NOTE] +> **Authentication & Authorization** are handled by a separate, external service. The Gateway integrates with this service to manage project access. + +## Analysis -Is responsible for the interaction with UI, user authentication and authorization, project management, communicating -with the calculation instances +Analysis is responsible for the core logic of processing models and executing scripts. It performs the following functions: -### Persistence +- **Data Loading**: Ingesting data from various sources using loader plugins. +- **Model Linking**: Connecting loaded models using linker plugins to create a unified data structure. +- **Script Execution**: Running C#, Javascript, or Python scripts against the linked models. -Data is stored in MongoDB +Analysis can be performed in two modes: -## Calculation +- **Permanent Instances**: Manually managed by the user for long-running exploration and interactive analysis. +- **Temporary Instances**: Automatically created for one-time processing, ideal for automated pipelines or quick checks. -Is responsible for loading data, linking the models and executing scripts to obtain different results +## Persistence -Calculation can be done in 2 types of instances: +Both the **Gateway** and **Analysis** services rely on a MongoDB database for data persistence: -- Permanent -- Temporary +- **Gateway**: Stores project configurations, workspace metadata, and instance statuses. +- **Analysis**: Uses the database for temporary data storage during processing and for persisting analysis results. -A permanent instance is allocated and deallocated by the user on command. The purpose is to have a long-running instance -with the linked model to run different types of analysis +## Deployment & Orchestration -A temporary instance is used for one time processing of the models. The model is loaded and linked, a set of predefined -scripts is run to perform the analysis. After the calculations are done, the instance is deallocated. It is used for -CI/CD analysis +The orchestration of analysis components varies based on the environment: -### Persistence +### Docker -Data is stored in MongoDB +In standard containerized environments, a **Docker Executor** manages analysis instances dynamically. It handles: -## Deployment +- **Networking**: Ensuring the Gateway can communicate with the analysis instance. +- **Data Access**: Mapping local data folders to the analysis container so loaders and scripts can access source files. -See [Features](features.md) for more information about the deployment +See [Docker Compose](../home/installation.md#docker-compose) for more information about deployment to Docker ### Kubernetes -The deployment in Kubernetes is done deploying the calculation engine via a CRD - -### Docker +In Kubernetes deployments, analysis is managed through specialized controllers that handle the lifecycle of each instance as a native resource. -The deployment is done using Docker API +See [Kubernetes](../home/installation.md#) for more information about deployment to Kubernetes diff --git a/docs/architecture/rbac.md b/docs/architecture/rbac.md index 39aaae19..d8adc14d 100644 --- a/docs/architecture/rbac.md +++ b/docs/architecture/rbac.md @@ -1,49 +1,46 @@ -# RBAC - -> Work in Progress - -Roles: - -- Guest - basic user with limited capabilities -- Analyst - user that can perform different analysis on allowed projects -- Maintainer - handles operations on the allowed projects -- Administrator - has full access for every functionality - -## Project Management - -| Permission | Guest | Analyst | Maintainer | Administrator | -| -------------- | ------- | ------- | ---------- | ------------- | -| view_project | ✓ | ✓ | ✓ | ✓ | -| update_project | | | ✓ | ✓ | -| delete_project | | | ✓ | ✓ | -| create_project | | | | ✓ | - -## User Management - -| Permission | Guest | Analyst | Maintainer | Administrator | -| ------------------- | ----- | ------- | ---------- | ------------- | -| update_project_user | | | ✓ | ✓ | -| update_user_role | | | | ✓ | - -## Model Management - -| Permission | Guest | Analyst | Maintainer | Administrator | -| ---------------- | ----- | ------- | ---------- | ------------- | -| install_loader | | ✓ | ✓ | ✓ | -| uninstall_loader | | ✓ | ✓ | ✓ | -| install_linker | | ✓ | ✓ | ✓ | -| uninstall_linker | | ✓ | ✓ | ✓ | - -## Analysis - -| Permission | Guest | Analyst | Maintainer | Administrator | -| --------------------- | ------- | ------- | ---------- | ------------- | -| view_analysis | ✓ | ✓ | ✓ | ✓ | -| run_analysis | | ✓ | ✓ | ✓ | -| remove_analysis | | ✓ | ✓ | ✓ | -| view_script | | ✓ | ✓ | ✓ | -| create_script | | ✓ | ✓ | ✓ | -| update_script | | ✓ | ✓ | ✓ | -| delete_script | | ✓ | ✓ | ✓ | -| create_analysis_token | | | ✓ | ✓ | -| delete_analysis_token | | | ✓ | ✓ | +# RBAC Configuration + +> [!IMPORTANT] +> Role-Based Access Control (RBAC) and Authentication features are handled by a **separate, external service**. The +> implementation details here represent how ScriptBee interacts with that service. The implementation is not yet fully +> finalized and may be subject to change. + +## Roles + +Detailed here are the possible roles a user can have in ScriptBee. + +- Administrator - user that can perform any action +- Manager - user that can perform project management on project they belong to +- Analyst - user that can perform different analysis tasks on allowed projects +- Auditor - user that can view only allowed projects + +## Permissions + +### Project + +| Permission | Admin | Manager | Analyst | Auditor | +| --------------- | ------- | ------- | ------- | ------- | +| view_project | ✓ | ✓ | ✓ | ✓ | +| edit_project | ✓ | ✓ | | | +| remove_project | ✓ | ✓ | | | +| load_model | ✓ | ✓ | ✓ | | +| link_model | ✓ | ✓ | ✓ | | +| generate_script | ✓ | ✓ | ✓ | | +| create_script | ✓ | ✓ | ✓ | | +| edit_script | ✓ | ✓ | ✓ | | +| delete_script | ✓ | ✓ | ✓ | | + +### Analysis + +| Permission | Admin | Manager | Analyst | Auditor | +| --------------- | ------- | ------- | ------- | ------- | +| view_analysis | ✓ | ✓ | ✓ | ✓ | +| run_analysis | | ✓ | ✓ | ✓ | +| remove_analysis | | ✓ | ✓ | ✓ | + +### Token management + +| Permission | Admin | Manager | Analyst | Auditor | +| --------------------- | ----- | ------- | ------- | ------- | +| create_analysis_token | | | ✓ | ✓ | +| delete_analysis_token | | | ✓ | ✓ | diff --git a/docs/home/installation.md b/docs/home/installation.md index 2816889b..119782b6 100644 --- a/docs/home/installation.md +++ b/docs/home/installation.md @@ -1,4 +1,4 @@ -# Installation +# Installation ## Prerequisites @@ -37,6 +37,56 @@ services: - mongo ``` +#### How to run + +To run ScriptBee simply run the following command: + +```shell +docker-compose up +``` + +### Driver Configuration + +The Analysis service can be configured to use different drivers for managing analysis instances. Currently, the primary driver is **Docker**. + +#### Docker Driver Configuration + +To use the Docker driver, set the following environment variable: + +```dotenv +SCRIPTBEE__ANALYSIS__DRIVER=docker +``` + +Once enabled, the Gateway will spawn analysis instances as standalone Docker containers. + +##### Minimum Configuration + +For a basic setup (e.g., using the default Docker Compose), the minimum environment variables required are: + +```yaml +environment: + - SCRIPTBEE__ANALYSIS__DRIVER=docker + - SCRIPTBEE__ANALYSIS__DOCKER__DOCKERSOCKET=unix:///var/run/docker.sock # or npipe://./pipe/docker_engine on Windows + - SCRIPTBEE__ANALYSIS__DOCKER__USERFOLDERHOSTPATH=/path/to/your/data # Absolute path to SCRIPTBEE_DATA on host +``` + +##### Full Configuration Reference + +You can fine-tune the Docker driver behavior using the following environment variables. In .NET, these are mapped from the configuration section `ScriptBee:Analysis:Docker`. + +| Environment Variable | Description | Default / Example | +| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------- | ----------------------------------- | +| `SCRIPTBEE__ANALYSIS__IMAGE` | The Docker image used for analysis instances. | `dxworks/scriptbee/analysis:latest` | +| `SCRIPTBEE__ANALYSIS__DOCKER__DOCKERSOCKET` | URI to the Docker daemon socket. | `unix:///var/run/docker.sock` | +| `SCRIPTBEE__ANALYSIS__DOCKER__PORT` | The internal port the analysis container listens on. | `8080` | +| `SCRIPTBEE__ANALYSIS__DOCKER__NETWORK` | The Docker network name to attach containers to (required if using a custom network for MongoDB). | _None_ | +| `SCRIPTBEE__ANALYSIS__DOCKER__MONGODBCONNECTIONSTRING` | MongoDB connection string for the analysis instance. | _Inherits Gateway's if omitted_ | +| `SCRIPTBEE__ANALYSIS__DOCKER__USERFOLDERVOLUMEPATH` | The mount point for project data _inside_ the analysis container. | `/root/.scriptbee` | +| `SCRIPTBEE__ANALYSIS__DOCKER__USERFOLDERHOSTPATH` | The absolute path on the **host machine** where project data is stored. | _Inherits Gateway's if omitted_ | + +> [!IMPORTANT] +> The `SCRIPTBEE__ANALYSIS__DOCKER__USERFOLDERHOSTPATH` must be an **absolute path** on your host machine. This is because the Gateway tells the Docker daemon to mount this path into the new analysis containers. If this is incorrect, the analysis service will not be able to find your scripts or models. + ### MongoDB ScriptBee uses MongoDB as a database. In order to run ScriptBee, you need to setup a MongoDB server and set the @@ -94,3 +144,16 @@ scripbee: environment: - UserFolder__UserFolderPath=/root/scriptbee_data ``` + +## Kubernetes + +### Driver Configuration + +> [!CAUTION] +> Still work in progress + +For the Kubernetes deployment, the following environment variables need to be set + +```dotenv +SCRIPTBEE__ANALYSIS__DRIVER=kubernetes +``` diff --git a/docs/home/run.md b/docs/home/run.md deleted file mode 100644 index 51fe5b23..00000000 --- a/docs/home/run.md +++ /dev/null @@ -1,7 +0,0 @@ -# How to run - -To run ScriptBee simply run the following command: - -```shell -docker-compose up -``` diff --git a/docs/index.md b/docs/index.md index 978f4bbe..9304b484 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,14 +6,12 @@ written in C#, Javascript and Python on it. ## Installation -Check the [installation guide](home/installation.md) for more information. +For detailed setup instructions, please refer to the [installation guide](home/installation.md). ## How to run -To run ScriptBee simply run the following command: +To get ScriptBee up and running quickly with Docker, use the following command: ```shell docker-compose up ``` - -For more information, check the [run guide](home/run.md) for more information. diff --git a/docs/plugins/manifest.md b/docs/plugins/manifest.md index b660618a..8c50eab6 100644 --- a/docs/plugins/manifest.md +++ b/docs/plugins/manifest.md @@ -1,4 +1,4 @@ -# Plugin Manifest +# Plugin Manifest Each plugin folder must have a `manifest.yaml` file that describes the plugin. If the file is missing, the plugin will not be loaded. @@ -35,10 +35,10 @@ extensionPoints: - `description`: A description of the plugin - `name`: The name of the plugin - `extensionPoints`: A list of extension points that the plugin provides -- `kind`: The type of plugin -- `entryPoint`: If the extension point is a plugin, the entry point is the relative path to the DLL containing the - implemented interfaces for the respective plugins. If the extension point is a bundle, the entryPoint is the id of - the plugin -- `version`: The version of the plugin + - `kind`: The type of plugin (`Loader`, `Linker`, `ScriptGenerator`, `ScriptRunner`, `HelperFunctions`) + - `entryPoint`: If the extension point is a plugin, the entry point is the relative path to the DLL containing the implemented interfaces. If the extension point is a bundle, the entryPoint is the id of the plugin. + - `version`: The version of the plugin + - `language`: (Optional) The programming language supported by the plugin (e.g., `csharp`, `javascript`, `python`). + - `extension`: (Optional) The file extension associated with the plugin (e.g., `.cs`, `.js`, `.py`). > Note: depending on the plugin type, each extension point can have different properties diff --git a/docs/plugins/plugin_api.md b/docs/plugins/plugin_api.md index 563d9c5c..45c9544c 100644 --- a/docs/plugins/plugin_api.md +++ b/docs/plugins/plugin_api.md @@ -1,11 +1,10 @@ -# ScriptBee's Plugin API +# ScriptBee's Plugin API ## DxWorks.ScriptBee.Plugin.Api -ScriptBee's plugin API is a way to extend the functionality of ScriptBee. Plugins can be used to add custom -functionality to ScriptBee. +ScriptBee's plugin API provides a way to extend the functionality of the system. Plugins can be used to add custom loaders, linkers, script generators, script runners, and helper functions. -Currently, ScriptBee supports the following plugins: +Currently, ScriptBee supports the following types of plugins: - [Loader Plugins](loader.md) - [Linker Plugins](linker.md) @@ -14,13 +13,11 @@ Currently, ScriptBee supports the following plugins: - [Script Runner Plugins](script_runner.md) - [Bundle Plugins](bundle.md) -Every plugin must have a `manifest.yaml` file in its root directory. More information about the manifest can be found in -the [manifest section](manifest.md). +Every plugin must have a `manifest.yaml` file in its root directory. More information about the manifest can be found in the [manifest section](manifest.md). ## Services -Besides the plugin interfaces, ScriptBee also offers a set of services that can be used by plugins via dependency -injection. +Besides the plugin interfaces, ScriptBee offers a set of services that can be used by plugins via dependency injection. ### IHelperFunctionsContainer @@ -57,7 +54,6 @@ public interface IHelperFunctionsResultService void UploadResult(string fileName, string type, Stream content); } - ``` [ScriptBee's default helper functions](https://github.com/dxworks/scriptbee/tree/master/Plugins/HelperFunctions/DxWorks.ScriptBee.Plugin.HelperFunctions.Default) diff --git a/docs/scripts/first_csharp_script.md b/docs/scripts/first_csharp_script.md index 889cd957..7283ca47 100644 --- a/docs/scripts/first_csharp_script.md +++ b/docs/scripts/first_csharp_script.md @@ -12,7 +12,7 @@ using System; using System.Text; using System.Linq; using System.Collections.Generic; -using using ScriProjectContext; +using ScriptBee.Domain.Model.Context; using DxWorks.ScriptBee.Plugin.Api; using DxWorks.ScriptBee.Plugin.Api.Model; using static DxWorks.ScriptBee.Plugin.Api.HelperFunctions; From 84d23856c72c08ca84624440f5881f382e0ec5c7 Mon Sep 17 00:00:00 2001 From: Andrei Timar Date: Mon, 6 Apr 2026 07:27:21 +0300 Subject: [PATCH 2/3] docs: update CONTRIBUTING.md and README.md --- .github/CONTRIBUTING.md | 68 +++++++++++++++++++---------------- README.md | 80 +++++++++++++++++++++++++++++------------ 2 files changed, 96 insertions(+), 52 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 3f5d0679..e0c005ef 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,74 +1,82 @@ # Contributing to ScriptBee -Welcome! We are excited that you want to contribute to ScriptBee. This document outlines the guidelines and best practices for contributing to the project. +Welcome! We are excited that you want to contribute to ScriptBee. This document outlines the guidelines and best +practices for contributing to the project. ## How to Contribute ### Reporting Bugs -If you find a bug, please check if an issue already exists. If not, open a new issue using the **Bug Report** template for the relevant component (WebApp, Client, Plugins). + +If you find a bug, please check if an issue already exists. If not, open a new issue using the **Bug Report** template +for the relevant component (WebApp, Client, Plugins). ### Suggesting Enhancements -We welcome ideas for new features or improvements. Please open an issue using the **Feature Request** template to discuss your ideas with the maintainers. + +We welcome ideas for new features or improvements. Please open an issue using the **Feature Request** template to +discuss your ideas with the maintainers. ### Pull Requests + 1. **Fork the repository** and create your branch from `main`. 2. **Implement changes** following the coding standards described below. 3. **Ensure tests pass** and add new tests if necessary. 4. **Write conventional commit messages** (see below). 5. **Submit a Pull Request** with a clear description of the changes and link any related issues. -## Project Structure +## Repository Structure -- **ScriptBeeWebApp**: The backend server built with C# and .NET. -- **ScriptBeeClient**: The frontend application built with Angular and TypeScript. -- **Plugins**: Community and core plugins for ScriptBee. -- **DxWorks.ScriptBee.Plugin.Api**: The API used for building plugins. -- **docs**: Documentation built with MkDocs. +To help you navigate the project, here is a breakdown of the key directories: + +- **`DxWorks.ScriptBee.Plugin.Api/`**: The core library containing the interfaces required for developing ScriptBee + plugins (e.g., `IModelLoader`, `IModelLinker`, `IScriptRunner`). +- **`Plugins/`**: Contains the default plugin implementations and helper functions. + - `HelperFunctions/`: Default helper functions for script execution. + - `ScriptRunner/`: Default runners for C#, Javascript, and Python scripts. +- **`ScriptBeeClient/`**: The Angular-based frontend application (UI). +- **`ScriptBeeWebApp/`**: The main backend service implemented in .NET. It includes: + - `src/Gateway`: Orchestration, project management, and instance allocation. + - `src/Analysis`: Core logic for model loading and script execution. + - `src/Workspace`: Model persistence and management. +- **`docs/`**: Documentation source files, built with **VitePress**. +- **`scripts/`**: Utility scripts for building, packing, and maintaining the project. ## Coding Standards ### Backend (C#) + - Follow the rules defined in [.editorconfig](../.editorconfig). - We use **CSharpier** for automatic code formatting. - Ensure all public APIs are documented. ### Frontend (TypeScript / Angular) + - We use **Prettier** for formatting. - We use **ESLint** for linting. - Components should follow the Angular Style Guide. ### Documentation -- Documentation is located in the [docs](../docs) directory and configured via `mkdocs.yml`. -- Write clear, concise, and professional English. + +- Documentation is located in the [docs](../docs) directory and built with **VitePress**. +- Run the documentation locally: + ```bash + cd docs + npm install + npm run docs:dev + ``` ## Commit Messages -We use **[Conventional Commits](https://www.conventionalcommits.org/)** for all commit messages. This keeps the Git history clean and enables automated tooling. +We use **[Conventional Commits](https://www.conventionalcommits.org/)** for all commit messages. **Format:** `(): ` -Common types: - -| Type | When to use | -|------|-------------| -| `feat` | A new feature | -| `fix` | A bug fix | -| `docs` | Documentation changes only | -| `refactor` | Code change that is not a fix or feature | -| `test` | Adding or updating tests | -| `chore` | Build process, tooling, dependencies | - -**Examples:** -``` -feat: add dark mode toggle -fix: resolve project loading race condition -docs: update plugin API reference -``` +Common types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`. ## Development Setup - **Backend**: Requires .NET 10 or higher. Open `ScriptBee.slnx` or the individual project folders. - **Frontend**: Requires Node.js and npm. Navigate to `ScriptBeeClient` and run `npm install`. -- **Documentation**: Requires Python and MkDocs. Run `pip install -r docs/requirements.txt` (if applicable) or `mkdocs serve`. +- **Docker**: Many components rely on Docker for container orchestration during development (e.g., running MongoDB or + Analysis instances). Thank you for your contributions! diff --git a/README.md b/README.md index 1da81766..9462588c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -# ScriptBee +# ScriptBee + +

+ ScriptBee Logo +

## What is ScriptBee? @@ -6,36 +10,68 @@ ScriptBee is a tool that helps the analysis of different models. Different tools loaders, ScriptBee can load the data and create a model. The model can then be analyzed by running different scripts written in C#, Javascript and Python on it. -## Documentation +## Quick Start + +The fastest way to get started with ScriptBee is using Docker Compose. -The full documentation can be found [here](https://dxworks.org/scriptbee/). +### Run with Docker -### Run locally MkDocs +To get ScriptBee running quickly, create a `docker-compose.yaml` file with the following content and run +`docker compose up -d`: -```bash -docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material +```yaml +version: "3.8" +services: + mongo: + image: mongo:4.4 + container_name: mongo + restart: unless-stopped + volumes: + - mongodb_data:/data/db + + scriptbee: + image: dxworks/scriptbee + ports: + - "4201:80" + volumes: + - scriptbee_data:/root/.scriptbee + environment: + - ConnectionStrings__mongodb=mongodb://mongo:27017/ScriptBee?authSource=admin + - UserFolder__UserFolderPath=/root/.scriptbee + depends_on: + - mongo + +volumes: + mongodb_data: + scriptbee_data: ``` -## How to run +### Accessing the UI -### Run +Once the containers are running, open your browser and navigate to **[http://localhost:4201](http://localhost:4201)**. -To run ScriptBee simply run the following command: +--- -```bash -docker-compose up -``` +## Configuration -For local development, run the following command: +ScriptBee can be configured using environment variables. Below are the most important settings: -```sh -docker-compose -f docker-compose-dev.yaml up -``` +| Variable | Description | Default | +|------------------------------|------------------------------------------------------------------|----------------------------| +| `ConnectionStrings__mongodb` | Connection string for the MongoDB instance used for persistence. | `mongodb://mongo:27017...` | +| `UserFolder__UserFolderPath` | Host path for storing project data and shared files. | | +| `SCRIPTBEE_ANALYSIS__DRIVER` | How analysis instances are managed: `docker` or `kubernetes`. | `docker` | + +For more detailed information on advanced configuration, check the * +*[Deployment Features](docs/architecture/features.md)** documentation. + +--- + +## Documentation + +Full documentation is available at [https://dxworks.org/scriptbee/](https://dxworks.org/scriptbee/). -## Project structure +## Contributing -- DxWorks.ScriptBee.Plugin.Api - the project with the plugin interface -- Plugins - folder with the default bundle plugin -- Domain - main business logic -- Driving - Web Application -- Driven - Database adapter +For information on the repository structure, development setup, and how to contribute, please refer to our * +*[Contributing Guide](.github/CONTRIBUTING.md)**. From 41686cc3910844304411b28680aa54c3de582c07 Mon Sep 17 00:00:00 2001 From: Andrei Timar Date: Mon, 6 Apr 2026 07:29:04 +0300 Subject: [PATCH 3/3] docs: update docs about installation --- docs/home/installation.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/home/installation.md b/docs/home/installation.md index 119782b6..40ba655e 100644 --- a/docs/home/installation.md +++ b/docs/home/installation.md @@ -74,6 +74,36 @@ environment: You can fine-tune the Docker driver behavior using the following environment variables. In .NET, these are mapped from the configuration section `ScriptBee:Analysis:Docker`. +| Environment Variable | Description | Default / Example | +| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------- | ----------------------------------- | +| `SCRIPTBEE__ANALYSIS__IMAGE` | The Docker image used for analysis instances. | `dxworks/scriptbee/analysis:latest` | +| `SCRIPTBEE__ANALYSIS__DOCKER__DOCKERSOCKET` | URI to the Docker daemon socket. | `unix:///var/run/docker.sock` | +| `SCRIPTBEE__ANALYSIS__DOCKER__PORT` | The internal port the analysis container listens on. | `8080` | +| `SCRIPTBEE__ANALYSIS__DOCKER__NETWORK` | The Docker network name to attach containers to (required if using a custom network for MongoDB). | _None_ | +| `SCRIPTBEE__ANALYSIS__DOCKER__MONGODBCONNECTIONSTRING` | MongoDB connection string for the analysis instance. | _Inherits Gateway's if omitted_ | +| `SCRIPTBEE__ANALYSIS__DOCKER__USERFOLDERVOLUMEPATH` | The mount point for project data _inside_ the analysis container. | `/root/.scriptbee` | +| `SCRIPTBEE__ANALYSIS__DOCKER__USERFOLDERHOSTPATH` | THE absolute path on the **host machine** where project data is stored. | _Inherits Gateway's if omitted_ | + +> [!IMPORTANT] +> The `SCRIPTBEE__ANALYSIS__DOCKER__USERFOLDERHOSTPATH` must be an **absolute path** on your host machine. This is because the Gateway tells the Docker daemon to mount this path into the new analysis containers. If this is incorrect, the analysis service will not be able to find your scripts or models. + +Once enabled, the Gateway will spawn analysis instances as standalone Docker containers. + +##### Minimum Configuration + +For a basic setup (e.g., using the default Docker Compose), the minimum environment variables required are: + +```yaml +environment: + - SCRIPTBEE__ANALYSIS__DRIVER=docker + - SCRIPTBEE__ANALYSIS__DOCKER__DOCKERSOCKET=unix:///var/run/docker.sock # or npipe://./pipe/docker_engine on Windows + - SCRIPTBEE__ANALYSIS__DOCKER__USERFOLDERHOSTPATH=/path/to/your/data # Absolute path to SCRIPTBEE_DATA on host +``` + +##### Full Configuration Reference + +You can fine-tune the Docker driver behavior using the following environment variables. In .NET, these are mapped from the configuration section `ScriptBee:Analysis:Docker`. + | Environment Variable | Description | Default / Example | | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------- | ----------------------------------- | | `SCRIPTBEE__ANALYSIS__IMAGE` | The Docker image used for analysis instances. | `dxworks/scriptbee/analysis:latest` |