Layer 2 network access - Manual - Industrial Edge - Industrial Edge - Industrial Edge - Documentation of Industrial Edge APIs - CLI tools - Industrial Edge - References - APIs

Industrial Edge Platform Operation - APIs & References

Product
Industrial Edge
Edition
12/2024
Language
en-US (original)

After creating application using iectl publisher standalone-app create

  • Connect container to a network with name zzz_layer2_net1.
  • Specify an network zzz_layer2_net1 from type external and the name zzz_layer2_net1.
  • Both names must be the same.

If container-container communication is required, e.g. two services in an app, you have to define an extra network (e.g. a Docker Bridge network).

The docker-compose.yaml should look like this.

# 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