Registry
Registry copied to clipboard
Free and open source aerial data storage server for DroneDB.
DroneDB Registry
DroneDB Registry is a simple, user-friendly aerial data management and storage application. It is STAC-compliant and features JWT authentication.
Combined with Hub, it provides a simple, fast and reliable platform for hosting and sharing geospatial images and data. It also allows you to view orthophotos, point clouds and 3d models (obj) easily and effortlessly directly in the browser.
Orthophoto and flight path
Files with previews
Point cloud interactive view
Example repositories
Getting started with Docker
To get started, download Docker and install it. Then run this command:
docker run -it --rm -p 5000:5000 -v ${PWD}/registry-data:/data dronedb/registry
The data will be stored in the local folder registry-data
.
Open http://localhost:5000 in your browser to start using the application.
Default credentials are admin
and password
.
Useful links:
- Swagger: http://localhost:5000/swagger
- Version: http://localhost:5000/version
- (req auth) Quick Health: http://localhost:5000/quickhealth
- (req auth) Health: http://localhost:5000/health
- (req auth) Hangfire: http://localhost:5000/hangfire
The log file is located in registry-data/logs/registry.txt
.
Getting started natively
You need to install the latest version of the DroneDB library and add it to PATH.
Download the latest release for your platform and run the following command:
./Registry.Web ./registry-data
There are several other command line options:
-a, --address (Default: localhost:5000) Address to listen on
-c, --check Check configuration and exit.
-r, --reset-hub Reset the Hub folder by re-creating it.
--help Display this help screen.
--version Display version information.
Storage folder (pos. 0) Required. Points to a directory on a filesystem where to store Registry data.
NOTE: This configuration uses sqlite as database. It is for local testing only. If you want to use the application in a heavy load environment, check the following section.
Change admin password
Go to http://localhost:5000/account to change password.
Otherwise, you can change the admin password by changing the value of the field DefaultAdmin.Password
in the appsettings.json
file. After changing the password you need to restart the application.
Use MySQL / MariaDB instead of Sqlite
After the first run close the program and edit the file appsettings.json
in registry-data
folder:
"AuthProvider": "Mysql",
"RegistryProvider": "Mysql",
"HangfireProvider": "Mysql",
"ConnectionStrings": {
"IdentityConnection": "Server=db;Database=RegistryAuth;Uid=registry;Pwd=password",
"RegistryConnection": "Server=db;Database=RegistryData;Uid=registry;Pwd=password",
"HangfireConnection": "Server=db;Database=RegistryHangfire;Uid=registry;Pwd=password;Allow User Variables=true;Connect Timeout=300"
},
Make sure the user registry
has the following permissions:
GRANT ALL PRIVILEGES ON *.* TO 'registry'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
Then restart the application, the databases will be automatically created.
Running with docker-compose
cd docker/testing
docker-compose up -d
The stack is composed of:
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="[email protected]"
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
[email protected]
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 Core 6 platform and runs natively on both Linux and Windows.
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 (need NodeJS 14+):
cd Registry.Web/ClientApp
npm install -g webpack@4
npm install
webpack
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 pull
docker-compose down
docker-compose up -d
Project architecture
Note
DroneDB Registry is under development and is targeted at GIS developers and tech enthusiasts. To contribute to the project, please see the contributing guidelines.