Make sure you have access to:
- a PostgreSQL 14+ database
- a realm on a Keycloak instance
You need to configure your Keycloak realm, see Configuring Keycloak.
Clone the repository
git clone https://gitlab.com/hook0/hook0 cd hook0
Build Hook0 UI
You must to have Node.js LTS installed (and npm).
Building Hook0 UI requires the following environment variables:
|Base URL of the API (example: |
|URL of your Keycloak instance (you need the |
|Name of your Keycloak realm|
|Name of your public Keycloak client (|
You need to define and export these variables in your shell before you continue.
cd frontend npm ci npm run build cd ..
In this guide we will assume that the Hook0 API web sever is going to serve Hook0 UI (this is simpler), but you can serve it separately as it is just a static web application.
Build Hook0 API
You need to have Rust stable installed.
cd api SQLX_OFFLINE=true cargo build --release cd ..
This will create the
This executable is a web server: when you run it, it will bind to an IP address and port (by default:
A lot of configuration options are available, and some of them are mandatory. Each option can be set using either a CLI parameter or an environment variable.
To see the list of options and their descriptions, run
--no-default-features --features reqwest-rustls-tls-native-roots: ensure that all outgoing HTTPS requests are validated using your OS certificate store
Hook0 API uses the
env_loggercrate to manage its log output. You should make sure you have defined a
RUST_LOG=info,sqlx=warn,actix_governor=warnenvironment variable before running it in order to see some log output.
Build Hook0 Output Worker
Prerequisites, building and configuration of Hook0 Output Worker are very similar to those of Hook0 API.
cd output-worker SQLX_OFFLINE=true cargo build --release cd ..
This will create the
You can run multiple workers so that they share the work.
--no-default-features --features reqwest-rustls-tls-native-roots: ensure that all outgoing HTTPS requests are validated using your OS certificate store.
Updated 28 days ago