Skip to main content

Production Deployment

Running in production

You will need Git. Clone the repo and initialize submodules:

git clone https://github.com/DroneDB/Registry
cd Registry
git submodule update --init --recursive

And then run the following commands:

Linux

cd docker/production
chmod +x run.sh
./run.sh

Windows

cd docker/production
run.bat

Check that everything is running smoothly:

docker-compose ps
docker-compose logs -f

When all the containers are running, you can then open http://localhost:5000 in your browser, use admin:password as default credentials.

You can stop the application by issuing:

docker-compose down

The run.sh / run.bat script will create the default appsettings.json file, the database initialization script and start the Docker containers.

It is possible to customize the startup settings by creating a .env file in the same folder. Here's an example:

Linux (quotes are important)

MYSQL_ROOT_PASSWORD="default-root-password"
MYSQL_PASSWORD="default-mysql-password"
REGISTRY_ADMIN_MAIL="test@test.it"
REGISTRY_ADMIN_PASSWORD="password"
REGISTRY_SECRET="longandrandomsecrettobegeneratedusingcryptographicallystrongrandomnumbergenerator"
EXTERNAL_URL=""
CONTROL_SWITCH='$controlSwitch'

Windows (values without quotes)

MYSQL_ROOT_PASSWORD=default-root-password
MYSQL_PASSWORD=default-mysql-password
REGISTRY_ADMIN_MAIL=test@test.it
REGISTRY_ADMIN_PASSWORD=password
REGISTRY_SECRET=longandrandomsecrettobegeneratedusingcryptographicallystrongrandomnumbergenerator
EXTERNAL_URL=
CONTROL_SWITCH=$controlSwitch

If you want to reduce the log verbosity, you can change "Information" to "Warning" in appsettings.json:

    "LevelSwitches": {
"$CONTROL_SWITCH": "Warning"
}

then run

docker-compose restart registry

Info: Any changes to the configuration file need to restart the registry container

Build Docker image

If you want to build the image from scratch, you can use the following commands:

git clone https://github.com/DroneDB/Registry
cd Registry
git submodule update --init --recursive
docker build . -t dronedb/registry

Running from source

Registry is written in C# on .NET 9 platform and runs natively on Linux, Windows, and macOS. To install the latest .NET SDK see the official download page. Before building registry ensure you have ddblib in your path, if not, download the latest release and add it to PATH.

Clone the repository:

git clone https://github.com/DroneDB/Registry
cd Registry
git submodule update --init --recursive

Build the Hub interface (needs Node.js 22+ LTS):

cd Registry.Web/ClientApp
npm install
npm run build

Note: The build script uses --openssl-legacy-provider for Node.js 17+ compatibility with webpack 4.

Build the solution from the command line:

dotnet build

Run the tests to make sure the project is working correctly:

dotnet test

Then you can run the application:

dotnet run --project Registry.Web ./registry-data

Updating

In order to update the application, you need to replace the executable with the latest version. It will perform the required migrations and update the database at the next startup.

With docker or docker-compose, you update the application by pulling the latest image and restarting the container:

docker-compose down
docker-compose pull
docker-compose up -d

Hub auto-update on startup

Registry embeds the Hub web app (Vue SPA) as a versioned ZIP and extracts it to {StoragePath}/ClientApp/ on first run. Starting from Registry 2.x, the embedded Hub carries a version.txt marker; on every startup Registry compares it to the version on disk and, on any mismatch (upgrade or downgrade), wipes the folder and re-extracts the embedded build. No manual step is required after a docker pull or a binary swap.

Logs:

 -> Upgrading Hub: 2.0.0 -> 2.1.0
?> Hub folder is ok (v2.1.0)

To force a re-extraction (for instance after editing files inside ClientApp/ for debugging) run with --reset-hub:

dotnet Registry.Web.dll ./registry-data --reset-hub

Hub update notice in the browser

Once the server is upgraded, currently-loaded browser tabs still run the previous Hub bundle. The next call to /sys/features returns the new server version; the Hub detects the mismatch and forces a hard reload (the server already serves index.html with Cache-Control: no-cache). After the reload a one-shot dialog tells the user "DroneDB Hub has been updated", with links to the corresponding release pages on GitHub. The check is skipped in embed mode and during local development.

Persisted branding across upgrades

Registry serves any file dropped under {StoragePath}/branding/ from the URL prefix /branding/. This folder is never touched by the Hub upgrade — drop your logos, favicons, and site.webmanifest there and reference them from AppSettings:HubOptions (see Hub UI Customization).

registry-data/
├── ClientApp/ # replaced on every Hub upgrade
├── branding/ # preserved across upgrades
│ ├── acme-banner.svg
│ ├── favicon.ico
│ └── site.webmanifest
└── appsettings.json

Project architecture

dronedb-registry-architecture

Key Components

  • Registry.Web: ASP.NET Core web application
  • Registry.Adapters: Database and DroneDB library adapters
  • Hub (Vue.js): Frontend SPA in Registry.Web/ClientApp
  • Hangfire: Background job processing