You are not logged in. Click here to log in.

codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Tags:  not added yet
This page requires advanced Docker and Docker-Compase know how!

How to start a codeBeamer application without docker-compose

Create custom network

docker network create codebeamer

Start mysql

Properties:

  • Detached (running in the background)
  • MySQL username: user; password: pass
  • Volume: codebeamer-db-data. The data will be stored after container restart/recreation
  • Network: previously created codebeamer network
    docker run -d --name codebeamer-db --network=codebeamer -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=codebeamer -e MYSQL_MAX_ALLOWED_PACKET=1024M -e MYSQL_INNODB_BUFFER_POOL_SIZE=1G -e MYSQL_INNODB_LOG_FILE_SIZE=256M -e MYSQL_INNODB_LOG_BUFFER_SIZE=256M -v codebeamer-db-data:/var/lib/mysql/data intland/mysql:5.7.21

If you want to reach mysql container from the host machine add -p option.

docker run -d --name codebeamer-db --network=codebeamer -p 8081:3306 -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=codebeamer -e MYSQL_MAX_ALLOWED_PACKET=1024M -e MYSQL_INNODB_BUFFER_POOL_SIZE=1G -e MYSQL_INNODB_LOG_FILE_SIZE=256M -e MYSQL_INNODB_LOG_BUFFER_SIZE=256M -v codebeamer-db-data:/var/lib/mysql/data intland/mysql:5.7.21

With this command you can reach the mysql inside the container at localhost:8081

Start codebeamer app

Properties:

  • Port 8080 published on 8080 so you can reach the application at http://localhost:8080
  • Network: previously created codebeamer network
  • Volumes for the following folder
    • codebeamer/repository/search
    • codebeamer/logs
    • codebeamer/repository/docs
  • Connects to the database that is in the previously created docker container

Read-only volume

docker run -d --name codebeamer-app --network=codebeamer -p 8080:8080 -v codebeamer-app-repository-docs:/home/appuser/codebeamer/repository/docs -v codebeamer-app-repository-search:/home/appuser/codebeamer/repository/search -v codebeamer-app-logs:/home/appuser/codebeamer/logs -e TZ=Europe/Berlin -e CB_database_JDBC_Username=user -e CB_database_JDBC_Password=pass -e CB_database_JDBC_Driver=com.mysql.jdbc.Driver -e CB_database_JDBC_ConnectionURL="jdbc:mysql://codebeamer-db:3306/codebeamer?autoReconnect=true&zeroDateTimeBehavior=convertToNull&emulateLocators=true&characterEncoding=UTF-8&useSSL=false" -e CB_database_JDBC_Timeout=120  intland/codebeamer:latest

You can check the path of a volume with the following command

docker volume inspect codebeamer-app-logs

Example output

[
    {
        "CreatedAt": "2019-03-29T10:45:48+01:00",
        "Driver": "local",
        "Labels": null,
        "Mountpoint": "/var/lib/docker/volumes/codebeamer-app-logs/_data",
        "Name": "codebeamer-app-logs",
        "Options": null,
        "Scope": "local"
    }
]

Where Mountpoint is the path of the volume.


Bind mount

docker run -d --name codebeamer-app --network=codebeamer -p 8080:8080 -v $(pwd)/codebeamer-app-repository-docs:/home/appuser/codebeamer/repository/docs -v $(pwd)/codebeamer-app-repository-search:/home/appuser/codebeamer/repository/search -v $(pwd)/codebeamer-app-logs:/home/appuser/codebeamer/logs -e TZ=Europe/Berlin -e CB_database_JDBC_Username=user -e CB_database_JDBC_Password=pass -e CB_database_JDBC_Driver=com.mysql.jdbc.Driver -e CB_database_JDBC_ConnectionURL="jdbc:mysql://codebeamer-db:3306/codebeamer?autoReconnect=true&zeroDateTimeBehavior=convertToNull&emulateLocators=true&characterEncoding=UTF-8&useSSL=false" intland/codebeamer:latest

The first start will always fail but it creates the necessary directories.

After the first (failed) start you need to do the following steps:

More secure solution

Assuming you are in the directory where you want to bind folders.

Change group of the directory
sudo chgrp -R 1001 $(pwd)
Add write acces to the group
sudo chmod -R g+w $(pwd)
Check the permissions of the directory
sudo ls -al $(pwd)

You should see

drwxrwxr-x  2 root <name_of_your_group> 4096 Mar 29 11:02 codebeamer-app-logs

Where name_of_your_group is the name of your group with id 1001

Less secure solution

sudo chmod -R 777 $(pwd)