Layer-2-Netzwerkzugang - Manual - Industrial Edge - Industrial Edge - Industrial Edge - Documentation of the Industrial Edge Platform - IEM - Hub - Industrial - Device - IED - Edge - IEH

Industrial Edge Platform Operation - APIs & Referenzen

Portfolio
Industrial Edge
Product
Industrial Edge
Product Version
v25.04
Edition
04/2025
Language
de-DE

Nach dem Erstellen der Anwendung mit iectl publisher standalone-app create

  • Verbinden Sie Container mit einem Netzwerk mit dem Namen zzz_layer2_net1.
  • Geben Sie ein Netzwerk zzz_layer2_net1 vom Typ extern und den Namen zzz_layer2_net1 an.
  • Beide Namen müssen identisch sein.

Wenn eine Container-Container-Kommunikation erforderlich ist, z. B. zwei Dienste in einer App, müssen Sie ein zusätzliches Netzwerk (z. B. ein Docker-Bridge-Netzwerk) definieren.

Die docker-compose.yaml sollte wie folgt aussehen.

# examples are based on given yaml
version: "2.4" 
services: 
  nginx: #serviceName to be used in --redirectsection, to tell device to use this service for app redirection.
    image: nginx:alpine 
    restart: always 
    mem_limit: 200m
    networks:
      - zzz_layer2_net1
    volumes:
      - './publish/:/publish/'
      - './cfg-data/:/cfg-data/'
networks:
  zzz_layer2_net1:
    external: true
    name: zzz_layer2_net1
$ iectl publisher standalone-app version create \
        --appname "my cool app" \
        --yamlpath "/path/to/folder/with/docker-compose.yaml" \ 
        --versionnumber "1.0.0" \
        --nginxjson '{"nginx":[{"name":"ui","protocol":"HTTPS","port":"80","headers":"","rewriteTarget":"/"}]}' \ # nginxjson is json map of docker compose service name and array of reverse proxy.
        --redirectsection "nginx" \         # redirectsection requires the service name within docker-compose which contains the container that shall be exposed
        --redirecttype "FromBoxReverseProxy" \  # redirecttype is either FromBoxSpecificPort for direct port exposure or FromBoxReverseProxy for reverse proxy exposure
        --redirecturl "ui/" \                   # redirecturl is the port which shall be exposed from your container
        --restredirecturl "" \                  # restredirecturl path will be used upon redirect to your application