Skip to main content

Creating an Organizations service

You should create a dedicated Organizations service if you want to:

  • Limit access to the organizations you've previously defined so that some users only have access to some repositories OR
  • Customize commit messages by repository (e.g., adding a JIRA ticket to your commit messages based on the repository)

This guide will walk you through everything you need to know to create such a service.

Organizations service template and API

You have two main options for building this service. You can:

  1. (Recommended) Fork our Organizations service template and modify it to meet your needs. Please see the README for how to spin this up quickly. It can be as simple as updating a CSV file.
  2. Build your own service that fulfills the GraphQL contract using any GraphQL stack (e.g., NodeJS, Rust, C#, etc.)

We generally recommend forking the template and modifying it as, in most cases, that will be faster and easier than building it yourself. Regardless of which one you choose, however, some developer time will be required on your end.

Agent variables

Once you've created an organizations service, you'll need to update your Agent run command to provide it with additional variables. Please note that these variables/arguments must be combined with ones found in other steps in the Configuring the Moderne Agent guide.

Environment variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_ORGANIZATION_SERVICE_URLtrueThe URL of your GraphQL service that provides access control for your organizations or commit message customization.
MODERNE_AGENT_ORGANIZATION_SERVICE_SKIPSSLfalsefalseSpecifies whether or not to skip SSL validation for HTTP connections to this Organization service instance. This must be set to true if you use a self-signed SSL/TLS certificate.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_ORGANIZATION_SERVICE_URL=http://localhost:8091 \
# ... Additional variables