Skip to main content

Drill4J Backend

Drill4J Backend is responsible for receiving, processing and authorizing data.

Installation#

There are two ways to install Drill4J Backend:

  1. Using Docker
  2. Using JAR file

Using Docker#

  1. To install Drill4J Backend using Docker, follow the steps described in local-deployment.

  2. Additionally, you can also set up the environment variables (see below).

  3. Ensure that Drill4J Backend is running successfully by checking the http://localhost:8090 endpoint. You should receive a response similar to:

    {
    "message": "Drill4J Admin Backend"
    }

Using JAR file#

To install Drill4J Backend using a JAR file, follow these steps:

  1. Install PostgreSQL 17.

  2. Create a database and a user for Drill4J Backend.

  3. Download the latest Drill4J Backend release (admin-shadow-<version>.zip file) from the releases page.

  4. Unzip the admin-shadow-<version>.zip file.

  5. Find the admin-app-<version>-all.jar file in the unzipped directory and move it to the root directory of the installation.

  6. Set up the environment variables (see below).

  7. Run the Drill4J Backend using the following command:

    java -jar admin-app-<version>-all.jar
  8. Ensure that Drill4J Backend is running successfully by checking the http://localhost:8090 endpoint. You should receive a response similar to:

    {
    "message": "Drill4J Admin Backend"
    }

Configuration#

Drill4J Backend is configured using environment variables. You can set them in a .env file in the root directory of the project.

Environment Variables#

The following environment variables are used to configure Drill4J Backend with their default values:

Server Configuration#

Environment VariableDescriptionDefault Value
PORTServer port8090
SSL_KEY_STOREPath to the SSL key store
SSL_KEY_ALIASAlias for the SSL key
SSL_KEY_STORE_PASSWORDPassword for the SSL key store
SSL_PRIVATE_KEY_PASSWORDPassword for the private key

Database Configuration#

Environment VariableDescriptionDefault Value
DRILL_DB_HOSTDatabase hostlocalhost
DRILL_DB_PORTDatabase port5432
DRILL_DB_NAMEDatabase namedrill
DRILL_DB_USER_NAMEDatabase usernamepostgres
DRILL_DB_PASSWORDDatabase passwordpostgres
DRILL_DB_MAX_POOL_SIZEMaximum pool size for the database20

Authentication Configuration#

Environment VariableDescriptionDefault Value
DRILL_JWT_SECRETSecret for JWT authentication
DRILL_JWT_LIFETIMELifetime for JWT tokens60 minutes
DRILL_OAUTH2_ENABLEDEnable OAuth2 authenticationfalse
DRILL_OAUTH2_AUTHORIZE_URLOAuth2 authorization URL
DRILL_OAUTH2_ACCESS_TOKEN_URLOAuth2 access token URL
DRILL_OAUTH2_USERINFO_URLOAuth2 user info URL
DRILL_OAUTH2_CLIENT_IDOAuth2 client ID
DRILL_OAUTH2_CLIENT_SECRETOAuth2 client secret
DRILL_OAUTH2_SCOPESOAuth2 scopes
DRILL_OAUTH2_REDIRECT_URLOAuth2 redirect URL
DRILL_OAUTH2_AUTOMATIC_SIGN_INEnable automatic sign-in for OAuth2false
DRILL_AUTH_SIMPLE_ENABLEDEnable simple authenticationtrue
DRILL_AUTH_SIMPLE_SIGN_UP_ENABLEDEnable sign-up for simple authenticationtrue

Metrics Configuration#

Environment VariableDescriptionDefault Value
DRILL_METRICS_UI_BASE_URLBase URL for the metrics UI
DRILL_METRICS_UI_BUILD_TESTING_REPORT_PATHPath for the build testing report in the metrics UI/dashboard/2

Scheduler Configuration#

Environment VariableDescriptionDefault Value
DRILL_SCHEDULER_REFRESH_VIEWS_INTERVAL_IN_MINUTESInterval in minutes for refreshing views30
DRILL_SCHEDULER_DATA_RETENTION_JOB_CRONCron expression for the data retention job0 0 1 * * ?

Swagger UI#

Drill4J Backend provides Swagger API documentation for easy exploration of available endpoints. To access the Swagger UI, open your browser and navigate to:

http://localhost:8090/swagger

This will display the interactive API documentation where you can view and test the available API endpoints:

Swagger UI

Swagger UI

Authentication and Authorization#

🚧 UNDER CONSTRUCTION. TO BE COMPLETED SOON 🚧

Troubleshooting#

  1. Миграция не применяется до конца / фейлится Причина - shared memory не выделена в контейнере PostgreSQL.