fhir-server/samples/docker
dependabot[bot] 8c39f5ef46
Bump HealthcareSharedPackageVersion from 3.2.45 to 4.0.6 (#2414)
* Bump HealthcareSharedPackageVersion from 3.2.45 to 4.0.6

Bumps `HealthcareSharedPackageVersion` from 3.2.45 to 4.0.6.

Updates `Microsoft.Health.Abstractions` from 3.2.45 to 4.0.6
- [Release notes](https://github.com/microsoft/healthcare-shared-components/releases)
- [Commits](https://github.com/microsoft/healthcare-shared-components/compare/3.2.45...4.0.6)

Updates `Microsoft.Health.Api` from 3.2.45 to 4.0.6
- [Release notes](https://github.com/microsoft/healthcare-shared-components/releases)
- [Commits](https://github.com/microsoft/healthcare-shared-components/compare/3.2.45...4.0.6)

Updates `Microsoft.Health.Extensions.DependencyInjection` from 3.2.45 to 4.0.6
- [Release notes](https://github.com/microsoft/healthcare-shared-components/releases)
- [Commits](https://github.com/microsoft/healthcare-shared-components/compare/3.2.45...4.0.6)

Updates `Microsoft.Health.Test.Utilities` from 3.2.45 to 4.0.6
- [Release notes](https://github.com/microsoft/healthcare-shared-components/releases)
- [Commits](https://github.com/microsoft/healthcare-shared-components/compare/3.2.45...4.0.6)

Updates `Microsoft.Health.Core` from 3.2.45 to 4.0.6
- [Release notes](https://github.com/microsoft/healthcare-shared-components/releases)
- [Commits](https://github.com/microsoft/healthcare-shared-components/compare/3.2.45...4.0.6)

Updates `Microsoft.Health.Extensions.BuildTimeCodeGenerator` from 3.2.45 to 4.0.6
- [Release notes](https://github.com/microsoft/healthcare-shared-components/releases)
- [Commits](https://github.com/microsoft/healthcare-shared-components/compare/3.2.45...4.0.6)

Updates `Microsoft.Health.SqlServer` from 3.2.45 to 4.0.6
- [Release notes](https://github.com/microsoft/healthcare-shared-components/releases)
- [Commits](https://github.com/microsoft/healthcare-shared-components/compare/3.2.45...4.0.6)

Updates `Microsoft.Health.SqlServer.Api` from 3.2.45 to 4.0.6
- [Release notes](https://github.com/microsoft/healthcare-shared-components/releases)
- [Commits](https://github.com/microsoft/healthcare-shared-components/compare/3.2.45...4.0.6)

Updates `Microsoft.Health.Tools.Sql.Tasks` from 3.2.45 to 4.0.6
- [Release notes](https://github.com/microsoft/healthcare-shared-components/releases)
- [Commits](https://github.com/microsoft/healthcare-shared-components/compare/3.2.45...4.0.6)

Updates `Microsoft.Health.Client` from 3.2.45 to 4.0.6
- [Release notes](https://github.com/microsoft/healthcare-shared-components/releases)
- [Commits](https://github.com/microsoft/healthcare-shared-components/compare/3.2.45...4.0.6)

---
updated-dependencies:
- dependency-name: Microsoft.Health.Abstractions
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Health.Api
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Health.Extensions.DependencyInjection
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Health.Test.Utilities
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Health.Core
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Health.Extensions.BuildTimeCodeGenerator
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Health.SqlServer
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Health.SqlServer.Api
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Health.Tools.Sql.Tasks
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Health.Client
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bumping sdk version

* Fix sql connection strings for local connections due to update SqlClient version upgrade

* Upgrade runtime

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Richa Bansal <ribans@microsoft.com>
2022-01-07 16:34:30 -08:00
..
README.md Update automaticUpdatesEnabled flag and image name (#1583) 2021-01-13 12:43:02 -08:00
docker-compose.yaml Bump HealthcareSharedPackageVersion from 3.2.45 to 4.0.6 (#2414) 2022-01-07 16:34:30 -08:00

README.md

Running Azure FHIR Server with Docker

IMPORTANT: This sample has been created to enable Dev/Test scenarios and is not suitable for production scenarios. Passwords are contained in deployment files, the SQL server connection is not encrypted, authentication on the FHIR Server has been disabled, and data is not persisted between container restarts.

The following instructions detail how to build and run the FHIR Server in Docker on Linux.

Use CI image

If it is not desirable to clone this repository and build locally an image of the most recent CI build is available from the Microsoft Container Registry(mcr.microsoft.com/healthcareapis). Both of the following methods will generate a R4 server, but a STU3 or R5 server can be created by changing which image is pulled.

Using docker-compose this image can be started with the following steps:

  1. Open a terminal window.
  2. Set the enviornment variable SAPASSWORD to what you want the SQL access password to be. Be sure to follow the SQL server password complexity requirements.
  3. Copy & save a local version of the docker-compose file from the release directory of the fhir-server project.
  4. Run the command:
docker-compose up -d .
  1. After giving the container a minute to start up it should be accessable at http://localhost:8080/metadata.

Using just docker this image can be started with the following steps. Replace the <SA_PASSWORD> below with your chosen SQL connection password, following the complexity rules linked above.

  1. Open a terminal window.
  2. Run the command:
docker network create fhir_network
  1. Run the command:
docker run --net fhir_network --name fhir_sql -e SA_PASSWORD=<SA_PASSWORD> -e ACCEPT_EULA="Y" -d mcr.microsoft.com/mssql/server
  1. Give the SQL server a minute to start up.
  2. Run the command:
docker run --net fhir_network -e FhirServer__Security__Enabled="false" -e SqlServer__ConnectionString="Server=tcp:fhir_sql,1433;Initial Catalog=FHIR;Persist Security Info=False;User ID=sa;Password=<SA_PASSWORD>;MultipleActiveResultSets=False;Connection Timeout=30;" -e SqlServer__AllowDatabaseCreation="true" -e SqlServer__Initialize="true" -e SqlServer__SchemaOptions__AutomaticUpdatesEnabled="true" -e DataStore="SqlServer" -p 8080:8080 -d mcr.microsoft.com/healthcareapis/r4-fhir-server azure-fhir-api
  1. After giving the container a minute to start up it should be accessible at http://localhost:8080/metadata.

Build and run with SQL Server using Docker Compose

Another way to get the Azure FHIR Server up and running on Docker is to build and run the Azure FHIR Server with a SQL server container using docker compose. Run the following command, replacing <SA_PASSWORD> with your chosen password (be sure to follow the SQL server password complexity requirements), from the root of the microsoft/fhir-server repository:

env SAPASSWORD='<SA_PASSWORD>' docker-compose -f samples/docker/docker-compose.yaml up -d

Given the FHIR API is likely to start before the SQL server is ready, you may need to restart the API container once the SQL server is healty. This can be done using docker restart <container-name>, i.e. docker restart docker restart docker_fhir-api_1.

Once deployed the FHIR Server metadata endpoint should be avaialble at http://localhost:8080/metadata/.

Run in Docker with a custom configuration

To build the azure-fhir-api image run the following command from the root of the microsoft/fhir-serverrepository:

The default configuration builds an image with the FHIR R4 API:

docker build -f samples/docker/Dockerfile -t azure-fhir-api .

For STU3 use the following command:

docker build -f samples/docker/Dockerfile -t azure-fhir-api --build-arg FHIR_VERSION=Stu3 .

The container can then be run, specifying configuration details such as:

docker run -d \
    -e FHIRServer__Security__Enabled="false"
    -e SqlServer__ConnectionString="Server=tcp:<sql-server-fqdn>,1433;Initial Catalog=FHIR;Persist Security Info=False;User ID=sa;Password=<sql-sa-password>;MultipleActiveResultSets=False;Connection Timeout=30;" \
    -e SqlServer__AllowDatabaseCreation="true" \
    -e SqlServer__Initialize="true" \
    -e SqlServer__SchemaOptions__AutomaticUpdatesEnabled="true" \
    -e DataStore="SqlServer" \
    -p 8080:8080
    azure-fhir-api azure-fhir-api