<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>SensorsのトピックUsing Docker-Swarm to duplicate Docker-Compose?</title>
    <link>https://community.nxp.com/t5/Sensors/Using-Docker-Swarm-to-duplicate-Docker-Compose/m-p/1242288#M6477</link>
    <description>&lt;P&gt;As part of my &lt;A href="https://intellipaat.com/docker-training-course/" target="_self"&gt;Docker Certification&lt;/A&gt;, I have to a project that contains 1 docker-compose file that runs 4 services that communicate with each other. These four services act like a 1 tank controller and 3 tank sensors. I want to duplicate the entire docker-compose with all four services using Docker Swarm. Here is an image of what I'm trying to do:&lt;SPAN&gt;&amp;nbsp;an&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://i.stack.imgur.com/R5glO.jpg" target="_blank" rel="nofollow noopener noreferrer"&gt;image showing the final goal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am having a lot of confusion when setting up the docker swarm. I ran the following commands:&lt;/P&gt;&lt;PRE&gt;docker swarm init
docker stack deploy --compose-file=docker-compose.yml tank&lt;/PRE&gt;&lt;P&gt;But this set up only lets me scale one service at a time. For example:&lt;/P&gt;&lt;PRE&gt;docker service scale tank_lowlevelalarm=4&lt;/PRE&gt;&lt;P&gt;This isn't what I want to do. I want to be able to scale the entire docker-compose by replicating all four services at the same time. My goal is that on my overlay network, it will look like I have multiple tanks, and each tank has 1 controller and 3 sensors. Is it possible for me to do this?&lt;/P&gt;&lt;P&gt;My docker-compose file, for reference:&lt;/P&gt;&lt;PRE&gt;version: '3.0'
services:
  tli:
    image: tli
    networks:
      - my-overlay

  lowlvlalarm:
    image: lowlvlalarm
    build: .
    networks:
      - my-overlay

  highlvlalarm:
    image: highlvlalarm
    build: ./HighLvlAlarm
    networks:
      - my-overlay

  plc:
    image: plc
    depends_on:
      - tli
      - lowlvlalarm
      - highlvlalarm
    networks:
      - my-overlay

networks:
  my-overlay:&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Feb 2026 21:55:08 GMT</pubDate>
    <dc:creator>Angelcrazy123</dc:creator>
    <dc:date>2026-02-03T21:55:08Z</dc:date>
    <item>
      <title>Using Docker-Swarm to duplicate Docker-Compose?</title>
      <link>https://community.nxp.com/t5/Sensors/Using-Docker-Swarm-to-duplicate-Docker-Compose/m-p/1242288#M6477</link>
      <description>&lt;P&gt;As part of my &lt;A href="https://intellipaat.com/docker-training-course/" target="_self"&gt;Docker Certification&lt;/A&gt;, I have to a project that contains 1 docker-compose file that runs 4 services that communicate with each other. These four services act like a 1 tank controller and 3 tank sensors. I want to duplicate the entire docker-compose with all four services using Docker Swarm. Here is an image of what I'm trying to do:&lt;SPAN&gt;&amp;nbsp;an&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://i.stack.imgur.com/R5glO.jpg" target="_blank" rel="nofollow noopener noreferrer"&gt;image showing the final goal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am having a lot of confusion when setting up the docker swarm. I ran the following commands:&lt;/P&gt;&lt;PRE&gt;docker swarm init
docker stack deploy --compose-file=docker-compose.yml tank&lt;/PRE&gt;&lt;P&gt;But this set up only lets me scale one service at a time. For example:&lt;/P&gt;&lt;PRE&gt;docker service scale tank_lowlevelalarm=4&lt;/PRE&gt;&lt;P&gt;This isn't what I want to do. I want to be able to scale the entire docker-compose by replicating all four services at the same time. My goal is that on my overlay network, it will look like I have multiple tanks, and each tank has 1 controller and 3 sensors. Is it possible for me to do this?&lt;/P&gt;&lt;P&gt;My docker-compose file, for reference:&lt;/P&gt;&lt;PRE&gt;version: '3.0'
services:
  tli:
    image: tli
    networks:
      - my-overlay

  lowlvlalarm:
    image: lowlvlalarm
    build: .
    networks:
      - my-overlay

  highlvlalarm:
    image: highlvlalarm
    build: ./HighLvlAlarm
    networks:
      - my-overlay

  plc:
    image: plc
    depends_on:
      - tli
      - lowlvlalarm
      - highlvlalarm
    networks:
      - my-overlay

networks:
  my-overlay:&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2026 21:55:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/Using-Docker-Swarm-to-duplicate-Docker-Compose/m-p/1242288#M6477</guid>
      <dc:creator>Angelcrazy123</dc:creator>
      <dc:date>2026-02-03T21:55:08Z</dc:date>
    </item>
  </channel>
</rss>

