DataHub Watchtower

This application is part of the DataHub Project.
https://datahubproject.net

Pub Version GitHub last commit Pub Likes

DataHub is a Cloud Development Ecosystem aiming to bring the power of Dart into the Cloud.

DataHub is still under development and is not to be considered production ready. Comprehensive documentation is yet to be released.


Configuration

This service requires at least one configuration file. Provide the configuration file as command line argument. You can split configuration files (f.e. config / secrets) into multiple files and provide every separate file as an argument.

You can find the debug configuration file here: resources/debug.yaml

Run Service in Dart VM

Dart code can be executed without compiling.

Requirements

Get Dependencies

$ dart pub get

Run Code Generator

$ dart run build_runner build

Run

$ dart run bin/datahub_watchtower.dart resources/debug.yaml

Compile and Run

Compiled code runs faster, so this is the preferred method for deployment. The resulting executable will be named bin/datahub_watchtower.exe.
The file extension is exe on linux or mac too, don't worry about it.

Requirements

Get Dependencies

$ dart pub get

Run Code Generator

$ dart run build_runner build

Compile

$ dart compile exe bin/datahub_watchtower.dart

Run

$ ./bin/datahub_watchtower.exe

Build Debug Docker Image

Requirements

This image will run the service in the vm. Code generation must be done on the host machine first. The image will build very fast (no compile time) but the service itself will run a little slower.
This is only recommended for development / testing purposes.

The resulting docker image will use the debug configuration: resources/debug.yaml.

Get Dependencies

$ dart pub get

Build using DataHub CLI

DataHub CLI will run the code generator, build the debug docker image and automatically tag it as datahub_watchtower:debug.

Build

$ datahub build -d

Build using Docker CLI

When building debug images manually, make sure to run code generation first:

Run Code Generator

$ dart run build_runner build

Build

$ docker build -t datahub_watchtower:debug -f Dockerfile.debug .

Build Release Docker Container

Requirements

The resulting docker image will expect a config file at /app/config.yaml. Best practice is to provide this config file via bind mount (Docker) or ConfigMap / Secrets (Kubernetes).

Build using DataHub CLI

DataHub CLI will build the release docker image and automatically and tag it as datahub_watchtower:latest and datahub_watchtower:{version}.

Build

$ datahub build

Build using Docker CLI

Build and Tag

$ docker tag datahub_watchtower:latest datahub_watchtower:{version}
$ docker build -t datahub_watchtower:latest .