Versions Compared

Key

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

...

Code Block
languagebash
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
languagebash
#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 8080: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
titledocker run with --network
Code Block
languagebash
#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 8080: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
titledocker 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 8080: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
titledocker run for host database

without docker network:

Code Block
languagebash
#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 8080: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
languagebash
#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 8080: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
languageyaml
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
  braga:
    image: "docker.stepover.de:8143/webso/braga"
    container_name: braga
    expose: 
      - "8080"
    ports:
      - "8080: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
titledocker-compose.yaml with frigg, braga, mariadb and rabbitMQ
Code Block
languageyaml
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
  braga:
    image: "docker.stepover.de:8143/webso/braga"
    container_name: braga
    expose: 
      - "8080"
    ports:
      - "8080: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
titledocker-compose.yaml for frigg and braga with extra_hosts
Code Block
languageyaml
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:
      - "8080: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
titlefrigg docker run with TyrService Cache port exposed
Code Block
languagebash
#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:8143/webso/frigg
Expand
titledocker-compose with TyrService Cache port exposed
Code Block
languagebash
services:
  frigg:
    image: "docker.stepover.de:8143/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.

...

Therefore your Tyrservice client must either accept all certificates without withoch checking the host.

Expand
titleJAVA 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 issued on frigg.webso.stepover.de. The host of the certificate must then be added in the hosts file.

...