System operation with Docker Containers / Docker Compose:
Docker Engine Version 20.10 or higher
Docker Compose Version 1.19 or higher
The correct 'docker pull' commands will be provided, and the image names must be replaced in the commands and configurations accordingly.
Code Block |
---|
|
docker pull docker.stepover.de:8143/webso/frigg
docker pull docker.stepover.de:8143/webso/braga
#optional
docker pull mariadb:latest
docker pull |
...
Code Block |
---|
|
#frigg
docker run -p 8443:8443 --env TZ="EUROPE/BERLIN" --volume /path/to/config.ini:/usr/local/tomcat/conf/config.ini --name frigg docker.stepover.de:8143/webso/frigg
#braga
docker run -p 80838080:8080 --env TZ="EUROPE/BERLIN" --volume /path/to/config.ini:/opt/braga/config.ini --volume /path/to/datadir:/mnt/braga_data --name braga docker.stepover.de:8143/webso/braga |
braga can be referenced by its container ip or the server ip with port-forwarding. The container ip can be obtained with docker inspect:
...
Expand |
---|
title | docker run with --network |
---|
|
Code Block |
---|
| #network
docker create webso-net
#frigg
docker run -p 8443:8443 --network webso-net --env TZ="EUROPE/BERLIN" --volume /path/to/config.ini:/usr/local/tomcat/conf/config.ini --name frigg docker.stepover.de:8143/webso/frigg
#braga
docker run -p 80838080:8080 --network webso-net --env TZ="EUROPE/BERLIN" --volume /path/to/config.ini:/opt/braga/config.ini --volume /path/to/datadir:/mnt/braga_data --name braga docker.stepover.de:8143/webso/braga |
|
braga can then be referenced by it’s container name and it’s container port.
...
Expand |
---|
title | docker run with mariaDB and rabbitMQ |
---|
|
Code Block |
---|
#network
docker create webso-net
#frigg
docker run -p 8443:8443 --network webso-net --env TZ="EUROPE/BERLIN" --volume /path/to/config.ini:/usr/local/tomcat/conf/config.ini --name frigg docker.stepover.de:8143/webso/frigg
#braga
docker run -p 80838080:8080 --network webso-net --env TZ="EUROPE/BERLIN" --volume /path/to/config.ini:/opt/braga/config.ini --volume /path/to/datadir:/mnt/braga_data --name braga docker.stepover.de:8143/webso/braga
#mariadb
docker run -p 3306:3306 --network webso-net --volume /var/lib/mysql:/var/lib/mysql --name mariadb mariadb:latest
#rabbitmq
docker run -p 5672:5672 -p 15672:15672 --network webso-net --name rabbitmq rabbitmq:3-management |
|
...
Expand |
---|
title | docker run for host database |
---|
|
without docker network: Code Block |
---|
| #frigg
docker run -p 8443:8443 --add-host=host.docker.internal:host-gateway --env TZ="EUROPE/BERLIN" --volume /path/to/config.ini:/usr/local/tomcat/conf/config.ini --name frigg docker.stepover.de:8143/webso/frigg
#braga
docker run -p 80838080:8080 --add-host=host.docker.internal:host-gateway --env TZ="EUROPE/BERLIN" --volume /path/to/config.ini:/opt/braga/config.ini --volume /path/to/datadir:/mnt/braga_data --name braga docker.stepover.de:8143/webso/braga |
with docker network: Code Block |
---|
| #frigg
docker run -p 8443:8443 --add-host=host.docker.internal:host-gateway --network webso-net --env TZ="EUROPE/BERLIN" --volume /path/to/config.ini:/usr/local/tomcat/conf/config.ini --name frigg docker.stepover.de:8143/webso/frigg
#braga
docker run -p 80838080:8080 --add-host=host.docker.internal:host-gateway --network webso-net --env TZ="EUROPE/BERLIN" --volume /path/to/config.ini:/opt/braga/config.ini --volume /path/to/datadir:/mnt/braga_data --name braga docker.stepover.de:8143/webso/braga |
|
config.ini with database on host:
...
Code Block |
---|
|
services:
frigg:
image: "docker.stepover.de:8143/webso/friggdev:latest_snapshot"frigg"
container_name: frigg
expose:
- "8443"
ports:
- "8443:8443"
networks:
- "webso-net"
volumes:
- "/path/to/config.ini:/usr/local/tomcat/conf/config.ini"
environment:
- TZ=Europe/Berlin
braga:
image: "docker.stepover.de:8143/webso/bragadev:v8017.a74f7db56.SNAPSHOTbraga"
container_name: braga
expose:
- "8080"
ports:
- "80838080:8080"
networks:
- "webso-net"
volumes:
- "/path/to/conig.ini:/opt/braga/config.ini"
- "/path/to/braga_data:/mnt/braga_data"
environment:
- TZ=Europe/Berlin
networks:
webso-net:
name: "webso-net" |
...
Expand |
---|
title | docker-compose.yaml with frigg, braga, mariadb and rabbitMQ |
---|
|
Code Block |
---|
| services:
frigg:
image: "docker.stepover.de:8143/webso/friggdev:latest_snapshotfrigg"
container_name: frigg
expose:
- "8443"
ports:
- "8443:8443"
networks:
- "webso-net"
volumes:
- "/path/to/config.ini:/usr/local/tomcat/conf/config.ini"
environment:
- TZ=Europe/Berlin
braga:
image: "docker.stepover.de:8143/webso/bragadev:v8017.a74f7db56.SNAPSHOTbraga"
container_name: braga
expose:
- "8080"
ports:
- "80838080:8080"
networks:
- "webso-net"
volumes:
- "/path/to/config.ini:/opt/braga/config.ini"
- "/path/to/braga_data:/mnt/braga_data"
environment:
- TZ=Europe/Berlin
mariadb:
image: "mariadb"
container_name: mariadb
environment:
- MYSQL_ROOT_PASSWORD=secret_pw
- MYSQL_DATABASE=frigg
expose:
- "3306"
ports:
- "3306:3306"
networks:
- "webso-net"
volumes:
- "path/to/mariadb_data:/var/lib/mysql"
rabbitmq:
image: "rabbitmq:3-management"
container_name: rabbitmq
expose:
- "15672"
- "5672"
ports:
- "15672:15672"
- "5672:5672"
networks:
- "webso-net"
networks:
webso-net:
name: "webso-net" |
|
...
Expand |
---|
title | docker-compose.yaml for frigg and braga with extra_hosts |
---|
|
Code Block |
---|
| services:
frigg:
image: "docker.stepover.de:8143/webso/frigg:"
container_name: frigg
expose:
- "8443"
ports:
- "8443:8443"
networks:
- "webso-net"
volumes:
- "/path/to/config.ini:/usr/local/tomcat/conf/config.ini"
environment:
- TZ=Europe/Berlin
extra_hosts:
- "host.docker.internal:host-gateway"
braga:
image: "docker.stepover.de:8143/webso/braga:"
container_name: braga
expose:
- "8080"
ports:
- "80838080:8080"
networks:
- "webso-net"
volumes:
- "/path/to/config.ini:/opt/braga/config.ini"
- "/path/to/braga_data:/mnt/braga_data"
environment:
- TZ=Europe/Berlin
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
webso-net:
name: "webso-net" |
|
Expand |
---|
title | config.ini with host-database |
---|
|
Code Block |
---|
| dabase_host=host.docker.internal
database_port=3306 |
|
TyrService Cache
When using the TyrService Cache, the cache-port of the frigg containers defined in the config tyr_cache_port
(default 1110) must be exposed.
Expand |
---|
title | frigg docker run with TyrService Cache port exposed |
---|
|
Code Block |
---|
| #frigg
docker run -p 8443:8443 -p 1110:1110 --env TZ="EUROPE/BERLIN" --volume /path/to/config.ini:/usr/local/tomcat/conf/config.ini --name frigg docker.stepover.de/webso/frigg |
|
Expand |
---|
title | docker-compose with TyrService Cache port exposed |
---|
|
Code Block |
---|
| services:
frigg:
image: "docker.stepover.de/webso/frigg"
container_name: frigg
expose:
- "8443"
- "1110"
ports:
- "8443:8443"
- "1110:1110"
networks:
- "webso-net"
volumes:
- "/path/to/config.ini:/usr/local/tomcat/conf/config.ini"
environment:
- TZ=Europe/Berlin
#braga, network, mariadb, rabbitMQ etc. |
|
For additional information see l) TyrService Cache
Local tyrservice testing
When testing the Tyrservice Integration with frigg running locally, there may be problems with the SSL certificate, since certificate authorites don’t issue trusted certificates for localhost.
Therefore your Tyrservice client must either accept all certificates withoch checking the host.
Expand |
---|
title | JAVA example for a Tyrservice Client accepting all certificates |
---|
|
Code Block |
---|
TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
public X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(X509Certificate[] certs, String authType) {
// Trust always
}
public void checkServerTrusted(X509Certificate[] certs, String authType) {
// Trust always
}
}};
// Install the all-trusting trust manager
SSLContext sc = SSLContext.getInstance("SSL");
// Create empty HostnameVerifier
HostnameVerifier hv = new HostnameVerifier() {
public boolean verify(String arg0, SSLSession arg1) {
return true;
}
};
sc.init(null, trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
HttpsURLConnection.setDefaultHostnameVerifier(hv); |
|
Alternatively we can provide a certificate for testing. The host of the certificate must then be added in the hosts file.
Expand |
---|
title | Example windows hosts entry C:\Windows\System32\drivers\etc\hosts |
---|
|
Code Block |
---|
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 frigg.webso.stepover.de |
|