...
The following examples apply for users who wish to start containers using the docker-compose
utility. Consider that examples have to be adjusted to individual environments.
Examples
...
Examples are contributed by the Japanese JS7 Community. Find the complete instructions from the Start with JS7 JobScheduler docker-compose (MySQL version) article.
Prepare
Docker Compose Configuration: docker-compose.yaml
...
Environment Variables used with the Examples
Code Block |
---|
language | bash |
---|
title | Environment Variables used with the Examples |
---|
|
echo -e "JS7USERID=$(id -u)\nJS7GROUPID=$(id -g)\nJS7VERSION=2-3-2" > .env
#
confirmcheck what to find from the fileenvironment variables
cat .env
JS7USERID=1000
JS7GROUPID=1000
JS7VERSION=2-3-2 |
Directories used with the Examples
Code Block |
---|
language | bash |
---|
title | Directories used with the Examples |
---|
|
mkdir db_data
mkdir js7-agent-primary
mkdir js7-controller-primary
mkdir js7-joc-primary-config
mkdir js7-joc-primary-logs |
...
Code Block |
---|
language | bash |
---|
title | Directories used with the Examples |
---|
|
.
├── .env
├── db_data
├── docker-compose.yml
├── hibernate.cfg.xml
├── js7-agent-primary
├── js7-controller-primary
├── js7-joc-primary-config
└── js7-joc-primary-logs |
Container Start-up
Start Container
Code Block |
---|
language | bash |
---|
title | Example how to start up Containers |
---|
|
docker-compose up -d
# check containers
$ docker-compose ps
NAME COMMAND SERVICE STATUS PORTS
js74-db-1 "docker-entrypoint.s…" db running 33060/tcp
js74-js7-joc-primary-1 "sh /usr/local/bin/e…" js7-joc-primary running 0.0.0.0:4446->4446/tcp, :::4446->4446/tcp |
Copy Hibernate Configuration to Container
Code Block |
---|
language | bash |
---|
title | Example how to copy hibernate.cfg.xml to the Container |
---|
|
cp -f hibernate.cfg.xml js7-joc-primary-config/ |
Create Database Objects from Container
Code Block |
---|
language | bash |
---|
title | Example how to copy hibernate.cfg.xml to the Container |
---|
|
docker-compose exec js7-joc-primary /bin/sh -c /opt/sos-berlin.com/js7/joc/install/joc_install_tables.sh
# check installation log file
tail js7-joc-primary-logs/install-result.log |
Restart Container
Code Block |
---|
language | bash |
---|
title | Example how to restart the Container |
---|
|
# restart container
docker-compose restart js7-joc-primary |