Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Configure the Database Connection

In a first step users have to create a database and account for JS7. The database has to support the Unicode character set.

Code Block
languagebash
titleAdd Database and Account for MySQL
linenumberstrue
# add database
CREATE DATABASE js7 CHARACTER SET utf8 COLLATE utf8_general_ci;
# add account
CREATE USER 'jobscheduler'@'%' IDENTIFIED BY 'jobscheduler';
GRANT ALL ON js7.* TO 'jobscheduler'@'%';

The database connection is specified from a Hibernate configuration file:

  • Location in the container: /var/sos-berlin.com/js7/joc/resources/joc/hibernate.cfg.xml
  • Consider to access the configuration file from the volume that is mounted when running the container, e.g. from a local folder /home/sos/js7/js7-joc-primary/config.
  • For modification of the Hibernate *.xml file consider explanations for your DBMS product available with the JS7 - Database article.

...

Create Database Objects

When the Hibernate configuration file hibernate.cfg.xml is ready then a script has to be executed that creates required objects in the database and that populates database tables.

Code Block
languagebash
titleInstall Create Database Objects
linenumberstrue
# create database objects
 docker exec -ti js7-joc-primary /bin/sh -c /opt/sos-berlin.com/js7/joc/install/joc_install_tables.sh

...