Configure on-prem source code management (SCM) with Moderne DX

In order for Moderne DX to correctly map repository clone URLs to the right origin and path you will need to provide the base URL(s) for your SCM server. For SaaS SCM services like GitHub, GitLab, Bitbucket (cloud) and AzureDevOps – no extra configuration is required. For on-prem SCM servers, though, you will need to provide Moderne with additional information. Specifically the type, base URL, and any alternate URLs that are used to access the server.

Configuring the Moderne DX service

The following table contains all of the variables/arguments you need to add to your Moderne DX service run command in order for it to correctly map and match the origins from different clone URLs. Please note that these variables/arguments must be combined with ones found in other steps in the Configuring the Moderne DX service guide.

You can configure multiple SCM servers by including multiple entries, each with a different {index}.

Variables:

  • MODERNE_DX_SCM_{index}_BASEURLThe primary URL of your SCM server. This URL will be used as the origin.

  • MODERNE_DX_SCM_{index}_TYPESpecifies the type of the SCM server (case insensitive). Choose between: GitHub, GitLab, Bitbucket, BitbucketCloud, AzureDevOps.

  • MODERNE_DX_SCM_{index}_ALTERNATEURLS_{alternate_url_index}One or more alternate URLs (each with a different {alternate_url_index}) which point to the same server. Use this to specify all the protocol and port combinations that can be used to reach the same server.

Example:

docker run \
# ... Existing variables
-e MODERNE_DX_SCM_0_BASEURL=https://bitbucket.example.com/stash \
-e MODERNE_DX_SCM_0_TYPE=Bitbucket \
-e MODERNE_DX_SCM_0_ALTERNATEURLS_0=ssh://bitbucket.example.com:7999 \
-e MODERNE_DX_SCM_0_ALTERNATEURLS_1=http://bitbucket.example.com:8080/stash \
# ... Additional variables

Last updated