Test upgrade in docker with docker-compose
Please note that we do not take any responsibility and we are not liable for any damage caused through use of this image, be it indirect, special, incidental or consequential damages (including but not limited to damages for loss of business, loss of profits, interruption or the like).
We highly recommend to create daily backups, and keep them for several days. you can find more information about backups here:
How to create a backup
Please note that the following docker setup is only for Evaluation purposes, Intland does not recommend using a dockerized database
This page requires advanced Docker and Docker-Compase know how!
Create volumes
docker volume create codebeamer-db-data && \
docker volume create codebeamer-app-repository-docs && \
docker volume create codebeamer-app-repository-search && \
docker volume create codebeamer-app-logs
Example upgrade from 9.3.0 to 9.4.0
For different version you need to modify the tag in intland/codebeamer:<version>
Docker-compose file
Create a file with the following content. Name it as docker-compose.yml.
version: '2.1'
services:
codebeamer-db:
image: intland/mysql:5.7.21
environment:
- MYSQL_USER=user
- MYSQL_PASSWORD=pass
- MYSQL_DATABASE=codebeamer
- "MYSQL_MAX_ALLOWED_PACKET=${MYSQL_MAX_ALLOWED_PACKET:-1024M}"
- "MYSQL_INNODB_BUFFER_POOL_SIZE=${MYSQL_INNODB_BUFFER_POOL_SIZE:-1G}"
- "MYSQL_INNODB_LOG_FILE_SIZE=${MYSQL_INNODB_LOG_FILE_SIZE:-256M}"
- "MYSQL_INNODB_LOG_BUFFER_SIZE=${MYSQL_INNODB_LOG_BUFFER_SIZE:-256M}"
volumes:
- codebeamer-db-data:/var/lib/mysql/data
codebeamer-app:
image: intland/codebeamer-git:9.3.0
ports:
- "8080:8080"
environment:
- DEBUG=false
- TZ=Europe/Berlin
- WAIT_HOSTS=container-mysql:3306
- WAIT_HOSTS_TIMEOUT=120
- "CB_database_JDBC_Username=user"
- "CB_database_JDBC_Password=pass"
- "CB_database_JDBC_Driver=com.mysql.jdbc.Driver"
- "CB_database_JDBC_ConnectionURL=jdbc:mysql://container-mysql:3306/codebeamer?autoReconnect=true&zeroDateTimeBehavior=convertToNull&emulateLocators=true&characterEncoding=UTF-8&useSSL=false"
volumes:
- 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
volumes:
codebeamer-db-data:
name: codebeamer-db-data
external: true
codebeamer-app-repository-docs:
name: codebeamer-app-repository-docs
external: true
codebeamer-app-repository-search:
name: codebeamer-app-repository-search
external: true
codebeamer-app-logs:
name: codebeamer-app-logs
external: true
Go to the directory where your docker-compose.yml is and run the following command
docker-compose up
You will see the logs.
Alternatively you can start it in the background with
docker-compose up -d
You can reach codeBeamer at http://localhost:8080
Do the following steps:
- Create a new project
- Create a new git repositry
- Upload a document
Stop codeBeamer 9.3.0
If you started without -d press ctrl +c
If you started with -d run the following command in the directory where your docker-compose.yml is
docker-compose down
Start codeBeamer 9.4.0
Change the version in docker-compose.yml
In this line
image: intland/codebeamer-git:9.3.0 --> image: intland/codebeamer:9.4.0
Then run the following command in the directory where your docker-compose.yml is.
docker-compose up
You will see the logs.
Alternatively you can start in in the background with
docker-compose up -d
The update is successful when the following criteria are met:
- No exceptions in the log
- Previously created project, repository found and works in the new container (9.4.0 in the example)
- Uploaded document available in the new container (9.4.0 in the example)