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

codeBeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Docker #5562876/HEAD / v380
Tags:  not added yet

codeBeamer 9.3 Docker Image

Docker Hub

https://hub.docker.com/r/intland/codebeamer

Supported docker variables

Wait service

Docker image contains 3rd party tool for waiting service like database. See: https://github.com/ufoscout/docker-compose-wait

Required parameters

  • CB_database_JDBC_Username
  • CB_database_JDBC_Password
  • CB_database_JDBC_Driver
  • CB_database_JDBC_ConnectionURL

Optional parameters

CB_SESSION_CLEANUP [true (default), false] - codeBeamer 10.x

Every session record has a version hash which is calculated from:

  • application version
  • build date
  • revision hash
  • branch name

Session cleanup feature removes every session record from the DB which has a different session version than the currently booting application.

License

  • CB_MAC_ADDRESS
    Your MAC address, e.g. 00:00:00:00:00:00
  • CB_LICENSE
    Your license in XML format, please note is must be one line

Email

  • CB_mail_host
    Host name of your email server. e.g. smtp.googlemail.com
  • CB_mail_user
    User that is used for authentication e.g. test@example.com
  • CB_mail_password
    Password that is used for authentication
  • CB_mail_from
    Email address of the sender. e.g. noreply@example.com
  • CB_mail_ssl
    Indicate that SSL is used. e.g. true / false
  • CB_mail_smtpPort
    Port of your email server. e.g. 465
  • CB_mail_serverScheme
    Protocol of the URL that will be used in sent emails. e.g. http / https
  • CB_mail_localname
    Host name of the URL that will be used in sent emails. e.g. example.com
  • CB_mail_serverPort
    Port of the URL that will be used in sent emails. e.g. 8080

Java

  • CB_MAXHEAPSIZE
    Xmx value of the JVM, e.g. 2000
  • JVM_OPTIONS_OVERRIDE
    You can override the default configuration of codeBeamer. Default values are logged during start up
  • JVM_OPTIONS
    You can extend the default configuration of codeBeamer. Default values are logged during start up
  • RESERVED_CODE_CACHE_SIZE_OVERRIDE
    You can override the default configuration of codeBeamer. Default values are logged during start up
  • RESERVED_CODE_CACHE_SIZE
    You can extend the default configuration of codeBeamer. Default values are logged during start up
  • HEAPSIZE_OVERRIDE
    You can override the default configuration of codeBeamer. Default values are logged during start up
  • HEAPSIZE
    You can extend the default configuration of codeBeamer. Default values are logged during start up
  • GC_OPT_OVERRIDE
    You can override the default configuration of codeBeamer. Default values are logged during start up
  • GC_OPT
    You can extend the default configuration of codeBeamer. Default values are logged during start up

Initial database script during startup

CB_INIT_SQL_FILES=/path/to/your/sqlfile1,/path/to/your/sqlfile2


The given sql files (coma or semicolon separated list) are executed during startup.


Please note that you need to attach the sql files as a volume.


The right side needs to match with the path that you defined in the environment variable.


with compose

volumes:
   - /path/to/folder/of/your/sql/files/on/host:/path/to/folder/of/your/sql/files/in/docker

without compose

docker run -v /path/to/folder/of/your/sql/files/on/host:/path/to/folder/of/your/sql/files/in/docker ...

Initial configuration

CB_initial_config can be used for starting the application with initial configuration.

CB_initial_config={ "search" : { "delay" : 90, "fuzzy-similarity-factor" : 0.6 } }

Time zone

TZ can be used to set timezone of the container. Please use the name of the time zones from here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

TZ=Europe/Berlin 

Debug

Remote java debug can be turned on, it uses the 7896 port inside the container

DEBUG=TRUE

Volumes

How to add (or override) files to the docker images

Bind your directory to the docker images

  codebeamer-app:
    image: cb-minimal-empty:latest
    env_file:
     - ./config/mail.env
     .....
    environment:
      - DEBUG=false
      ......
    volumes:
      - ~/update:/home/appuser/codebeamer/update
      - codebeamer-app-repository-docs:/home/appuser/codebeamer/repository/docs
      - codebeamer-app-repository-search:/home/appuser/codebeamer/repository/search
      - codebeamer-app-logs:/home/appuser/codebeamer/logs
    links:
      - codebeamer-db:container-mysql

"~/update" will be bound to the container and will be available under "/home/appuser/codebeamer/update"

On Windows docker hosts, the folder separator for update directory should be backslash - e.g.

- .\update:/home/appuser/codebeamer/update

Please also note that upon first startup docker guest will mount this folder as a windows share from host machine.

Update directory could contain the following files / directory

  • root.zip
    Content of root.zip will be extracted to the tomcat/webapps/ROOT directory, it can be used to override images, jsp files or add jars to the libs directory
  • root
    Content of root directory will be copied to the tomcat/webapps/ROOT directory, it can be used to override images, jsp files or add jars to the libs directory (Only from 9.4 version)
  • config.zip
    Content of config.zip will be extracted to the /codebeamer/config directory
  • config
    Content of config directory will be copied to the /codebeamer/config directory (Only from 9.4 version)
  • repository.zip
    Content of repository.zip will be extracted to /codebeamer/repository directory, it can be used for uploading logos
  • repository
    Content of repository directory will be copied to /codebeamer/repository directory, it can be used for uploading logos (Only from 9.4 version)

Use cases

How to change the logo of the application

Create a repository.zip with a logo.png in "/config/logo" directory

User the following configuration for CB_initial_config

CB_initial_config={ "interactive" : { "logo" : { "selected" : "custom", "custom-logo-available" : true, "custom-url" : "/logo/logo.png" } } }

Please note if you use docker compose file value of CB_initial_config should be escaped:

codebeamer-app:
    image: cb-minimal-empty:latest
    depends_on:
      codebeamer-db:
        condition: service_healthy
    env_file:
     - ./config/mail.env
       ......
    environment:
      - "CB_initial_config={ \"interactive\" : { \"logo\" : { \"selected\" : \"custom\", \"custom-logo-available\" : true, \"custom-url\" : \"/logo/logo.png\" } } }"
      - DEBUG=false
      - TZ=Europe/Berlin
       ...... 
How to change the login page
  codebeamer-app:
    image: cb-minimal-empty:latest
    depends_on:
      codebeamer-db:
        condition: service_healthy
    env_file:
     - ./config/mail.env
    ....
    environment:
      - "CB_initial_config={\"interactive\":{\"slogan-text\":{\"format\":\"\",\"text\":\"meine Kopfzeile\"},\"welcome-text\":{\"format\":\"W\"},\"login-text\":{\"format\":\"W\",\"keep-style\":false,\"text\":\"[{Html\\r\\n\\r\\n\\t\\t\\t\\t<html>\\r\\n\\t\\t\\t\\t<head>\\r\\n\\t\\t\\t\\t\\t<style>\\r\\n\\t\\t\\t\\t\\tbody {\\r\\n\\t\\t\\t\\t\\t\\tbackground-image: url('gui/background.jpg') ;\\r\\n\\t\\t\\t\\t\\t\\tbackground-repeat: no-repeat;\\r\\n\\t\\t\\t\\t\\t\\tbackground-attachment: fixed;\\r\\n\\t\\t\\t\\t\\t\\tbackground-size: 100% auto;\\r\\n\\t\\t\\t\\t\\t\\tfont-family: Arial, sans-serif;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\t.login {\\r\\n\\t\\t\\t\\t\\t  margin: 90px 90px;\\r\\n\\t\\t\\t\\t\\t  width: 300px;\\r\\n\\t\\t\\t\\t\\t  padding: 30px 25px;\\r\\n\\t\\t\\t\\t\\t  background: rgba(255,255,255,0.5);\\r\\n\\t\\t\\t\\t\\t  border: 1px solid #c4c4c4;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\t.login-input {\\r\\n\\t\\t\\t\\t\\t  width: 100%;\\r\\n\\t\\t\\t\\t\\t  height: 40px;\\r\\n\\t\\t\\t\\t\\t  margin-bottom: 10px;\\r\\n\\t\\t\\t\\t\\t  padding-left:10px;\\r\\n\\t\\t\\t\\t\\t  font-size: 14px;\\r\\n\\t\\t\\t\\t\\t  background: #fff;\\r\\n\\t\\t\\t\\t\\t  border: 1px solid #ccc;\\r\\n\\t\\t\\t\\t\\t  border-radius: 3px;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t.login-input:focus {\\r\\n\\t\\t\\t\\t\\t\\tborder-color:#6e8095;\\r\\n\\t\\t\\t\\t\\t\\toutline: none;\\r\\n\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t\\t.login-button {\\r\\n\\t\\t\\t\\t\\t  width: 100%;\\r\\n\\t\\t\\t\\t\\t  height: 40px;\\r\\n\\t\\t\\t\\t\\t  padding: 0;\\r\\n\\t\\t\\t\\t\\t  font-size: 14px;\\r\\n\\t\\t\\t\\t\\t  color: #fff;\\r\\n\\t\\t\\t\\t\\t  text-align: center;\\r\\n\\t\\t\\t\\t\\t  background: #000000;\\r\\n\\t\\t\\t\\t\\t  border: 0;\\r\\n\\t\\t\\t\\t\\t  border-radius: 3px;\\r\\n\\t\\t\\t\\t\\t  cursor: pointer; \\r\\n\\t\\t\\t\\t\\t  outline:0;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\t.login-lost\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t  text-align:center;\\r\\n\\t\\t\\t\\t\\t  margin-bottom:0px;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\t.login-lost a\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t  color:#666;\\r\\n\\t\\t\\t\\t\\t  text-decoration:none;\\r\\n\\t\\t\\t\\t\\t  font-size:11px;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\t</style>\\r\\n\\t\\t\\t\\t</head>\\r\\n\\t\\t\\t<body>\\r\\n\\t\\t\\t\\t<p>\\r\\n\\t\\t\\t\\t\\t<form class='login' id='loginForm' action='/cb/login.spr' method='post'>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t<input id='user' name='user' tabindex='0' type='text' class='login-input' placeholder='User' value=''/>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t<input id='password' name='password' type='password'  class='login-input' placeholder='Password' value='' autocomplete='off'/> \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t<input class='login-button' title='Login' type='submit' value='Login'>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t<p class='login-lost'><a href='/cb/lostPassword.do'>Forgot Password?</a></p>\\r\\n\\t\\t\\t\\t\\t</form>\\r\\n\\t\\t\\t\\t</p>\\r\\n\\t\\t\\t</body>\\r\\n\\t\\t\\t</html>\\r\\n\\t\\t\\t}]\"} } }"
- DEBUG=false
.....

Please note that it is recommended to use apostrophe instead of double apostrophe in HTML, also \r, \n, and \t special characters should be escaped


MySql docker image

Image extends the https://github.com/sclorg/mysql-container/tree/master/5.7 image, that is built for OpenShift, changes are

[mysqld]
character_set_server=utf8
character_set_filesystem=utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'
init_connect='SET collation_connection = utf8_general_ci'
skip-character-set-client-handshake