This document shows you step-by-step how to deploy xDM Server Container to Azure App Service.  I assume you have completed the tutorial of Install Semarchy xDM on Docker.  We will be deploying the xDM Server Container pointing to an existing Azure SQL Server with an empty semarchy repository database.  

1. Modify the "docker-compose.yml" (refer to the section Configure and run your Docker container), the xDM Application Server Container will be pointing to an existing Azure SQL Server. 

version: '3.8'
    driver: bridge

    image: semarchy/xdm:latest
      - '8088:8080'
      - semarchy-net
      test: ["CMD", "curl", "-f", "http://semarchy-appserver-azure:8088/semarchy/api/rest/probes/started"]
      # Repository connection, pointing to the semarchy-database service.
      # Reconfigure this connection to use a separate database.
      # Azure Database for PostgreSQL
      # Azure SQL Database
      - XDM_REPOSITORY_URL=jdbc:sqlserver://;databaseName=semarchy_repository
      - XDM_REPOSITORY_USERNAME=semarchy_repository
      - XDM_REPOSITORY_PASSWORD=(Your Password)
      # Repository read-only datasource credentials
      - XDM_REPOSITORY_READONLY_USERNAME=semarchy_repository_ro
      # Setup Token
      - SEMARCHY_SETUP_TOKEN=mySecretValue
      # Add other startup configuration properties below. For example, secrets management configuration
      # See
      # Volume for additional JAR libraries
      - ./additional-libraries:/usr/local/tomcat/additional-libraries

2. Run the following command, a docker container and image will be stored in the local docker desktop:

docker compose up --attach semarchy-appserver-azure --no-log-prefix

3. Create a Container Registry in Azure, say xdmcr

4. Install the Azure Command Line

5. Login to Azure Container Registry in the Command Prompt

C:\>az login
C:\>az acr login --name xdmcr
Login Succeeded

6. Create Access Keys in the Container Registry

7. Login to the Container Registry using the Access Keys as passwords

C:\>docker login
Username: xdmcr
Login Succeeded
C:\>docker images
semarchy/xdm   latest    4d3c2d55998e   6 days ago     955MB

8. Tag the local docker image to Azure Container Registry

C:\>docker tag semarchy/xdm:latest
C:\>docker images
REPOSITORY                              TAG       IMAGE ID       CREATED     
SIZE           latest    4d3c2d55998e   6 days ago     955MB
semarchy/xdm                            latest    4d3c2d55998e   6 days ago     955MB

9. Push the docker local image onto Azure Container Registry

C:\>docker push

10. Then you can see the Repositories of the Azure Container Registry contains your docker image

11. Create the Web App for xdm, choose Docker Container

12. Configure the App Service Application Settings, here are the environment variables needed, please refer to the values in your docker-compose.yml file.

13. Set up firewall rules on the Azure SQL Server that allows the Your App Service to access

14. Start the App Service and access the URL :
If you see the above page, you are good to go!