Sitecore Docker Dependency Tracking

Sitecore Docker Pro Tips

March 8, 2022

Services in Docker compose files can have dependencies attached to them, normally for checking the condition of one or more dependent services, i.e. database servers or supporting services.

Example:

        traefik:
    isolation: ${TRAEFIK_ISOLATION}
    image: ${TRAEFIK_IMAGE}
    command:
      - "--ping"
      - "--api.insecure=true"
      - "--providers.docker.endpoint=npipe:////./pipe/docker_engine"
      - "--providers.docker.exposedByDefault=false"
      - "--providers.file.directory=C:/etc/traefik/config/dynamic"
      - "--entryPoints.websecure.address=:443"
      - "--entryPoints.websecure.forwardedHeaders.insecure"
    ports:
      - "443:443"
      - "8079:8080"
    healthcheck:
      test: ["CMD", "traefik", "healthcheck", "--ping"]
    volumes:
      - source: \\.\pipe\docker_engine
        target: \\.\pipe\docker_engine
        type: npipe
      - ./traefik:C:/etc/traefik
    depends_on:
      id:
        condition: service_healthy
      cm:
        condition: service_healthy

    

Here we have an entry for the Traefik load balancer service which traffics network requests to the respective destinations (https://traefik.io/). See the "depends-on", which shows dependency on the health of the CM and ID service instances.

A few notes about dependency tracing.

Always start at the "depends-on" section for the affected service in the compose file and work you way down. In one instance, I had an error with spinning up a 10.2 instance. Tracing involved starting on the top entry which was traefik.

Always good idea to look at the logs of all your containers either through VSCode or Docker Desktop.

VSCode

Screenshot of the container logs in Sitecore Docker Desktop

      *  Docker Desktop

    

Screenshot of the Docker logs used diagnose errors

From these logs we can diagnose failing services or errors to track down.

Stay tuned for the next tip!

Second CTA Ogilvy's Legacy

Today, David Ogilvy's influence can still be felt in the world of advertising.

Ogilvy's Influence Example
Emphasis on research Market research is a crucial part of any successful advertising campaign
Focus on headlines A strong headline can make the difference between an ad that is noticed and one that is ignored
Use of visuals Compelling images and graphics are essential for capturing audience attention