Skip to main content

Docker Compose Example 2 (Lazy2)

version: "3"
services:
  lazytainer2:
    container_name: lazytainer2
    image: ghcr.io/vmorganp/lazytainer:master
    environment:
      - PORT=3000            # comma separated list of ports...or just the one 
      - LABEL=lazytainer2    # value of lazytainer.marker for other containers that lazytainer checks
      - TIMEOUT=15           # OPTIONAL number of seconds to let container idle
      - MINPACKETTHRESH=10   # OPTIONAL number of packets that must be recieved to keepalive/start container 
      - POLLRATE=1           # OPTIONAL number of seconds to sleep between polls
      - VERBOSE=true         # probably set this to false unless you're debugging or doing the initial demo
    ports:
      - 3000:3000
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
  taisun:
    image: linuxserver/taisun
    container_name: taisun2
    network_mode: service:lazytainer2
    depends_on: 
      - lazytainer2
    labels:
      - "lazytainer.marker=lazytainer2"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock