Installing YouTrack Kanban Board On Docker Swarm

Screenshot YouTrack

How To Install YouTrack As Kanban Board On Your Docker Swarm

Docker Nov 25, 2021

I was searching for an easy-to-use Kanban board for multiple weeks. I tested several instances found on an awesome list: kanboard, nullboard, vikunja, wekan, or taskboard.

Beyond that, they are all good no one really fitted me. But then yesterday I found that my favorite IDE developer has its own issue board. AND it is free to use!!! (for up to 10 people...)

YouTrack from JetBrains is free for up to 10 people
Photo from FreeImages

This tutorial will show how you can install YouTrack on your Docker Swarm and use it in production.

Set up Docker Compose file

To install YouTrack on your Docker Swarm you could use this Compose file. Keep in mind that this Compose file only works if you have installed a Traefik load balancer.

version: '3.5'

services:
  board:
    image: jetbrains/youtrack:2020.2.7479
    container_name: "youtrack-board"
    hostname: "youtrack.board"
    volumes:
      - data:/opt/youtrack/data
      - conf:/opt/youtrack/conf
      - logs:/opt/youtrack/logs
      - backups:/opt/youtrack/backups
    networks:
      - traefik-public
    deploy:
      placement:
        constraints:
          - node.labels.youtrack.data == true
      labels:
        - traefik.enable=true
        - traefik.docker.network=traefik-public
        - traefik.constraint-label=traefik-public
        - traefik.http.routers.youtrack-http.rule=Host(`board.${PRIMARY_DOMAIN}`)
        - traefik.http.routers.youtrack-http.entrypoints=http
        - traefik.http.routers.youtrack-http.middlewares=https-redirect
        - traefik.http.routers.youtrack-https.rule=Host(`board.${PRIMARY_DOMAIN}`)
        - traefik.http.routers.youtrack-https.entrypoints=https
        - traefik.http.routers.youtrack-https.tls=true
        - traefik.http.routers.youtrack-https.tls.certresolver=le
        - traefik.http.services.youtrack.loadbalancer.server.port=8080
volumes:
  data:
  conf:
  logs:
  backups:

networks:
  traefik-public:
    external: true
docker-compose.youtrack.yml for YouTrack installation

This file is created from a simple template but is extended with a constraint for a Docker Swarm node where the persisted volumes/data should be stored.

To successfully install this Compose file on any Swarm the label has to be set on any of your Docker Swarm nodes:

$> docker node update --label-add youtrack.data=true ID_OF_NODE_TO_USE

Additionally, each file has its deploy labels set to automatically receive an SSL cert after deploying. Read more about Traefik here.

Afterward, you can deploy it to your cluster as the service youtrack with:

$> docker stack deploy -c docker-compose.youtrack.yml youtrack

Install YouTrack

Now the Docker service should be deployed and you can hit your domain and follow the installation process:

Step 1: A token that could be found within the mounted devices (/conf/) has to be provided in the first step. Normally, if the default file path for docker volumes is used the token can be retrieved by executing:

$> cat /var/lib/docker/volumes/youtrack_conf/_data/internal/services/configurationWizard/wizard_token.txt

Step 2: Just press Set up

Install YouTrack 2020 from JetBrains by clicking Set up
YouTrack installation window

Step 3: Although I normally use HTTPS within the next step, I chose HTTP and set the base URL to https://board... This is done because Traefik does SSL certificate handling and not YouTrack on its own.

Step 4: Set up the admin login

Step 5: Activate the license (Use thee free license or buy one from JetBrains)


Some minutes later your personal instance of YouTrack is installed and you can start to create some Todos on your Kanban board.

Tags