Giter VIP home page Giter VIP logo

orthanc-on-azure's Introduction

Orthanc on Azure

Colby T. Ford, Ph.D.

This template repository deploys all the required Azure services to run the Orthanc DICOM viewer on Azure.

This uses a base Orthanc Docker image from the Osimis team, which is then customized with environment variables to connect to the backend Azure resources.

Terraform Steps

This repository uses Terraform to deploy all the required services to run the Orthanc DICOM viewer on Azure. (You can learn how to install the Terraform CLI here.)

First, login to Azure using az login.

To see what is going to be deployed, run:

terraform plan

Then, run the following command and type yes when prompted.

terraform apply

In a few minutes, all of the services will be deployed. Once the deployment is complete, navigate to https://portal.azure.com and locate your Resource Group (named something like orthanc-dev-123-rg).

Open Network for Database Access

Once your PostgreSQL database has been deployed, navigate to its Connection security screen in Azure.

Make sure the Allow access to Azure services setting is set to Yes. Also, you can add your home/office IP address to the firewall so that you can connect locally.

Docker Build Steps

The Docker image will be built with environment variables and will need to be pushed to the Azure Container Registry.

First, you must modify the orthanc.json file in this repository with the credentials and keys from your Azure services that were just deployed. You can also add users to Orthanc in the RegisteredUsers section of the JSON file.

Note: To generate the token needed for the Azure DICOM API, follow the instructions here: https://learn.microsoft.com/en-us/azure/healthcare-apis/get-access-token.

## From Azure CLI
$token=$(az account get-access-token --resource=https://dicom.healthcareapis.azure.com --query accessToken --output tsv)
curl -X GET --header "Authorization: Bearer $token"  https://<workspacename-dicomservicename>.dicom.azurehealthcareapis.com/v<version of REST API>/changefeed

echo $token

Build Dockerfile

When you build the Dockerfile, it will use the credentials and settings specified in the orthanc.json file.

docker build -t <CONTAINERREGISTRY>.azurecr.io/orthanc-viewer-001:latest .

Run Locally

docker run --name orthanc-viewer-001 -p 8042:8042 <CONTAINERREGISTRY>.azurecr.io/orthanc-viewer-001:latest

Push Image to Azure Container Registry

az login
az acr login --name <CONTAINERREGISTRY>

docker push <CONTAINERREGISTRY>.azurecr.io/orthanc-viewer-001:latest

Note: You will need to restart the Web App in Azure so that it can pull the newly pushed image.

orthanc-on-azure's People

Contributors

colbyford avatar

Watchers

 avatar  avatar

Forkers

tuplexyz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.