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.examplefile that.envcan be generated from using this command:just config generate-dotenv- The generator runs the repo’s
./envsubsttwice so defaults that reference other vars (e.g.$BACKEND_WEB_APP_PORT) resolve correctly.
- The generator runs the repo’s
- If you only plan on using the backend then everything should be configured for you.
- The current setup expects:
DOMAINfor public URLs (backend derives its public base URL automatically)VITE_API_URLfor the frontend to reach the backend API (must include/api)
- S3 endpoints:
S3_ENDPOINT_UPLOAD: used by browser presigned uploads (oftenhttp://localhost:9000in dev)S3_ENDPOINT_DOWNLOAD: used by browser downloads/display- In dev, defaults to
http://localhost:9000(downloads via a path-rewriting proxy will break presigned signatures).
- In dev, defaults to
-
If you set up Google OAuth credentials, set the variables here:
GOOGLE_CLIENT_ID="YOUR_CLIENT_ID" GOOGLE_CLIENT_SECRET="YOUR_CLIENT_SECRET" # Redirect URI must match your Google OAuth app config 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>"Then make sure to rebuild your backend Docker image:
docker compose build backendso that Docker now knows to install the extra set of dependencies. You should see a success message if it worked correctly.
LOG_LEVELis set toinfoby default. Setting it todebugmakes the logs very verbose, so it is recommended to leave the setting as is.
Build and Run The Containers¶
- The
Justfilein the project root contains all the logic needed to build and run the application. compose.sub.yamlis 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.