Skip to content

Setting Up DroneTM For Development

Prerequisites

Important

You must have Docker and Docker Compose installed first:

Just is required too:

(Optional) Configure Google OAuth

  • Create a new client ID and secret in your Google account for OAuth2.
  • Set the redirect URL to your local frontend URL, e.g. http://localhost:3040/auth.

Note

This step is only required to use the frontend.

Configure Your Dotenv

  • There is an example .env.example file that .env can be generated from using this command: just config generate-dotenv
  • If you only plan on using the backend then everything should be configured for you.
  • Else, if you set up Google OAuth credentials, set the variables here:
    GOOGLE_CLIENT_ID="YOUR_CLIENT_ID"
    GOOGLE_CLIENT_SECRET="YOUR_CLIENT_SECRET"
    GOOGLE_LOGIN_REDIRECT_URI="http://localhost:3040/auth"
    

Monitoring

  • At present, only Sentry is configured as the backend for logging with OpenTelemetry. By default logging in non-production environments is disabled.
  • To set it up and work with it, you will need these two ENV variables set correctly:
    MONITORING="sentry"
    SENTRY_DSN="<sentry dsn url here>"
    
    Also, make sure to uncomment INSTALL_MONITORING in compose.yaml to allow the Docker image to install the requisite monitoring libraries, otherwise you will get an error.
  • LOG_LEVEL is set to info by default. Setting it to debug makes the logs very verbose, so it is recommended to leave the setting as is.

Build and Run The Containers

  • The Justfile in the project root contains all the logic needed to build and run the application.
  • compose.sub.yaml is used for production builds - compose.yaml, meanwhile, is used for development.
  • To start the application, run: just start all
  • This command will pull the required Docker images and start all services correctly.

Access The Services

DroneTM Backend: http://localhost:8000

DroneTM Frontend: http://localhost:3040

Web ODM: http://localhost:9900

  • Default user: admin
  • Default password: password

Note the ports may be different if you changed them in the dotenv file.