Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This is a smiple project to experiment with the TeamCity Portable Kotlin DSL.

It provides all required services in containers that can be run using docker-compose.

The Services included are:

  • TeamCity with one agent as CI/CD tool
  • Gogs to manage git repositories
  • Mailhog to receive mails from TeamCity or Gogs

... Why?

I wanted to experiment with the Portable Kotlin DSL in an isolated environment.


A simple mail server with web ui and API.

Gogs (Git-Server)

Leightweight UI to manage git repositories.

TeamCity (CI/CD)

This server can be used for free as long as less than 100 Build configurations (jobs) are defined and no more than 3 agents are used. See JetBrains License Policy for more details.


Run the script in the docker directory. This will create the required keys in the docker/keys folder.

Then just run docker-compose up (you may have to do a sudo). To run everything in the background, use the -d option.

You will find more information about docker-compose at:

Setup Gogs

On first run Gogs will ask you to complete the installation.

Select the following options:

  • Select the SQLite3 option
  • Replace localhost with gogs on the Domain and Application URL
  • Email Service Settings
    • mailhog:1025
  • Server and Other Services Settings
    • Select Enable Mail Notifications
    • Leave the other options disabled
  • Select OK
  • Log in and create an account via "Sign up now". The first account will be granted admin privileges by default.
  • Add the public ssh key from the docker/keys folder to the SSH-Keys of the user.

Setup TeamCity

  • Click Proceed
  • Select HSQLDB (local database)
  • Accept License and disable anonoymous stats
  • Create the Admin account
  • Go to Administration -> Email Notifier
    • Enter mailhog for the server
    • Set 1025 as port
    • Test Connection. You can choose any email address as the recipient.
  • Add the Agent
    • Select Agents -> Unauthorized (there should be 1)
    • Select the Agent named regular_agent
    • Click Authorize Agent
  • Setup the ssh keys
    • Select the Root Project for example in Administration -> Projects
    • Select SSH Keys on the left-hand menu
    • Pick Upload SSH Keys and upload the private key from the docker/keys folder.

Accessing the repository

Depending on where you want to access the repository you need different URLs for the repository.

To access the repository from TeamCity use the following URL:


The same repository can be accessed from the outside using:


It seems to be important to explicitly add the port to the url. Otherwise you may get an error claiming that no key can be found.

Be sure to have the private key from the docker/keys folder available to your ssh client when operating with the repository from your machine. Alternatively you can add your default public key to the Gogs account.


A workbench project to experiment with TeamCity build configuration and Portable Kotlin DSL



No releases published


No packages published