1

I am going through the tutorial, https://doc.sitecore.com/xp/en/developers/100/developer-tools/walkthrough--using-the-getting-started-template.html and am on step 7. When I run the command, .\up.ps1, I get an error Version mismatch: file .\docker-compose.yml specifies version 1 but extension file .\docker-compose.override.yml uses version 2.2. I opened both files and do not see a version number in the docker-compose.yml file. I changed the version within the .\docker-compose.override.yml to version 1 but then got an error, version in .\docker-compose.ovrride.yml is invalid. I think I need to change the version of the docker-compose.yml to be verison 2.4 but do not see a way to do that...This is what I have in the docker-compose.yml file

services:
  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
  mssql:
    isolation: ${ISOLATION}
    image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${SITECORE_VERSION}
    environment:
      SA_PASSWORD: ${SQL_SA_PASSWORD}
      ACCEPT_EULA: "Y"
    ports:
      - "14330:1433"
    volumes:
      - type: bind
        source: .\mssql-data
        target: c:\data
  mssql-init:
    isolation: ${ISOLATION}
    image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION}
    environment:
      SQL_SERVER: ${SQL_SERVER}
      SQL_ADMIN_LOGIN: ${SQL_SA_LOGIN}
      SQL_ADMIN_PASSWORD: ${SQL_SA_PASSWORD}
      SITECORE_ADMIN_PASSWORD: ${SITECORE_ADMIN_PASSWORD}
      POST_DEPLOYMENT_WAIT_PERIOD: 300
    healthcheck:
      test: ["CMD", "powershell", "-command", "if ([System.Environment]::GetEnvironmentVariable('DatabasesDeploymentStatus', 'Machine') -eq 'Complete') { exit 0 } else { exit 1}"]
      start_period: 300s
      interval: 5s
    depends_on:
      mssql:
        condition: service_healthy
  solr:
    isolation: ${ISOLATION}
    image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${SITECORE_VERSION}
    ports:
      - "8984:8983"
    volumes:
      - type: bind
        source: .\solr-data
        target: c:\data
    environment:
      SOLR_MODE: solrcloud
    healthcheck:
      test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"]
  solr-init:
    isolation: ${ISOLATION}
    image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION}
    environment:
      SITECORE_SOLR_CONNECTION_STRING: http://solr:8983/solr
      SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME}
    depends_on:
      solr:
        condition: service_healthy
  id:
    isolation: ${ISOLATION}
    image: ${SITECORE_DOCKER_REGISTRY}sitecore-id6:${SITECORE_VERSION}
    environment:
      Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1
      Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET}
      Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST}
      Sitecore_Sitecore__IdentityServer__CertificateRawData: ${SITECORE_ID_CERTIFICATE}
      Sitecore_Sitecore__IdentityServer__PublicOrigin: https://${ID_HOST}
      Sitecore_Sitecore__IdentityServer__CertificateRawDataPassword: ${SITECORE_ID_CERTIFICATE_PASSWORD}
      Sitecore_License: ${SITECORE_LICENSE}
    healthcheck:
      test: ["CMD", "pwsh", "-command", "C:/Healthchecks/Healthcheck.ps1"]
      timeout: 300s
    depends_on:
      mssql-init:
        condition: service_healthy
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.id-secure.entrypoints=websecure"
      - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)"
      - "traefik.http.routers.id-secure.tls=true"
  cm:
    isolation: ${ISOLATION}
    image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION}
    depends_on:
      id:
        condition: service_started
      xconnect:
        condition: service_started
    environment:
      Sitecore_ConnectionStrings_Core: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Master: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Xdb.Processing.Tasks: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Processing.tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_ExperienceForms: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.ExperienceForms;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Exm.Master: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Exm.master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Sitecore.Reporting.Client: http://xconnect
      Sitecore_ConnectionStrings_Cortex.Processing.Engine: http://xconnect
      Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr;solrCloud=true
      Sitecore_ConnectionStrings_SitecoreIdentity.Secret:  ${SITECORE_IDSECRET}
      Sitecore_ConnectionStrings_XConnect.Collection: http://xconnect
      Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Operations.Client: http://xconnect
      Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Reporting.Client: http://xconnect
      Sitecore_ConnectionStrings_Xdb.ReferenceData.Client: http://xconnect
      Sitecore_License: ${SITECORE_LICENSE}
      Sitecore_Identity_Server_Authority: https://${ID_HOST}
      Sitecore_Identity_Server_InternalAuthority: http://id
      Sitecore_Identity_Server_CallbackAuthority: https://${CM_HOST}
      Sitecore_Identity_Server_Require_Https: "false"
      Sitecore_Analytics_Forwarded_Request_Http_Header: X-Forwarded-For
      SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME}
      MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET}
    healthcheck:
      test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
      timeout: 300s
    labels:
      - "traefik.enable=true"
      - "traefik.http.middlewares.force-STS-Header.headers.forceSTSHeader=true"
      - "traefik.http.middlewares.force-STS-Header.headers.stsSeconds=31536000"
      - "traefik.http.routers.cm-secure.entrypoints=websecure"
      - "traefik.http.routers.cm-secure.rule=Host(`${CM_HOST}`)"
      - "traefik.http.routers.cm-secure.tls=true"
      - "traefik.http.routers.cm-secure.middlewares=force-STS-Header"
  xconnect:
    isolation: ${ISOLATION}
    image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xconnect:${SITECORE_VERSION}
    ports:
      - "8081:80"
    depends_on:
      mssql-init:
        condition: service_healthy
      solr-init:
        condition: service_started
    environment:
      Sitecore_License: ${SITECORE_LICENSE}
      Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Processing.Engine.Storage: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Processing.Engine.Storage;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Processing.Engine.Tasks: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Processing.Engine.Tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_SolrCore: http://solr:8983/solr/${SOLR_CORE_PREFIX_NAME}_xdb;solrCloud=true
      Sitecore_Sitecore:XConnect:CollectionSearch:Services:Solr.SolrReaderSettings:Options:RequireHttps: 'false'
      Sitecore_Sitecore:XConnect:CollectionSearch:Services:XConnectSolrHealthCheckServicesConfiguration:Options:RequireHttps: 'false'
      Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrReaderSettings:Options:RequireHttps: 'false'
      Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrWriterSettings:Options:RequireHttps: 'false'
    healthcheck:
      test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
      timeout: 300s
  xdbsearchworker:
    isolation: ${ISOLATION}
    image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xdbsearchworker:${SITECORE_VERSION}
    depends_on:
      xconnect:
        condition: service_healthy
    restart: unless-stopped
    environment:
      Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_SolrCore: http://solr:8983/solr/${SOLR_CORE_PREFIX_NAME}_xdb;solrCloud=true
      Sitecore_License: ${SITECORE_LICENSE}
      Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrReaderSettings:Options:RequireHttps: 'false'
      Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrWriterSettings:Options:RequireHttps: 'false'
      Sitecore_Sitecore:XConnect:CollectionSearch:Services:XConnectSolrHealthCheckServicesConfiguration:Options:RequireHttps: 'false'
    healthcheck:
      test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1 -Port 8080"]
      timeout: 300s
  xdbautomationworker:
    isolation: ${ISOLATION}
    image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xdbautomationworker:${SITECORE_VERSION}
    depends_on:
      xconnect:
        condition: service_healthy
    restart: unless-stopped
    environment:
      Sitecore_ConnectionStrings_XConnect.Collection: http://xconnect
      Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_License: ${SITECORE_LICENSE}
    healthcheck:
      test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1 -Port 8080"]
      timeout: 300s
  cortexprocessingworker:
    isolation: ${ISOLATION}
    image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cortexprocessingworker:${SITECORE_VERSION}
    depends_on:
      xconnect:
        condition: service_healthy
    restart: unless-stopped
    environment:
      Sitecore_ConnectionStrings_Processing.Engine.Storage: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Processing.Engine.Storage;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_Processing.Engine.Tasks: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Processing.Engine.Tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_ConnectionStrings_XConnect.Collection: http://xconnect
      Sitecore_ConnectionStrings_XConnect.Configuration: http://xconnect
      Sitecore_ConnectionStrings_XConnect.Search: http://xconnect
      Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
      Sitecore_License: ${SITECORE_LICENSE}
    healthcheck:
      test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1 -Port 8080"]
      timeout: 300s

1 Answer 1

0

It looks like you just need to add on line one a version number, it'll default to version 1 if not present. Ex.

version: "2.4"

services:
  traefik:

(obviously truncating the rest of the document).

Here's a sample of a Docker Compose file (for reference): https://github.com/Sitecore/container-deployment/blob/master/compose/sxp/10.0/ltsc2019/xp0/docker-compose.yml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.