--- x-common-configuration: &common-configuration image: syncthing/syncthing environment: - TZ=Asia/Shanghai - PUID=0 - PGID=0 restart: unless-stopped healthcheck: test: curl -fkLsS -m 2 127.0.0.1:8384/rest/noauth/health | grep -o --color=never OK || exit 1 interval: 10s timeout: 5s retries: 3 services: syncthing-1: <<: *common-configuration hostname: my-syncthing-1 volumes: - /root/st-sync-1-folder:/st-folder - /root/st-sync-1-cfg:/var/syncthing/config ports: - 28001:8384 syncthing-2: depends_on: - syncthing-1 <<: *common-configuration hostname: my-syncthing-2 volumes: - /root/st-sync-2-folder:/st-folder - /root/st-sync-2-cfg:/var/syncthing/config ports: - 28002:8384