Creating a Docker-compose.yml file

The docker-compose.yml file contains the configurations for all the Hawk containers, the TIBCO BusinessWorks container, and the microagent. For complete information about the Hawk Container Edition configuration, see TIBCO Hawk® - Container Edition documentation.

The following sample shows the docker-compose.yml file:

version: '3'
services:
  hawkclustermanager:
    image: hkce_clustermanager:2.0
    ports:
      - '2561:2561' 
    environment: 
      tcp_daemon_url: hawkclustermanager:2561
      tcp_self_url: hawkclustermanager:2561
      hawk_domain: tcpdomain
  hawkagent:
    image: hkce_agent:2.0
    ports:
      - '2551:2551'
      - '2571:2571'
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      tcp_daemon_url: hawkclustermanager:2561
      tcp_self_url: hawkagent:2551
      hawk_domain: tcpdomain
      ami_tcp_session: hawkagent:2571
      DOCKER_HOST: unix:///var/run/docker.sock
      config_path: /tibco.home/hkce/2.0/config/
      hma_plugin_dir: /tibco.home/hkce/2.0/plugin/
  hawkconsole:
    image: hkce_console:2.0
    environment:
      tcp_daemon_url: hawkclustermanager:2561
      tcp_self_url: hawkconsole:2551
      hawk_domain: tcpdomain
      hawk_console_repository_path: /tibco.home/hkce/2.0/repo
    ports:
      - '2589:2589'
      - '8083:8083'
  bwcontainer:
    image: hkbwce:2.0
    environment:
      ami_agent_url: hawkagent:2571
      tcp_self_url : bwcontainer:2555
    ports:
      - '2555:2555'
Note: The ami_agent_url environment variable value set in TIBCO BusinessWorks Container Edition is same as the ami_tcp_session environment variable value set in the Hawk agent container.