microsoft / microsoft/fhir-server
docker compose installation.
- Dominant language
- TSQL
- Stars
- 1.4k
- Forks
- 592
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 41
Description
Hello everyone,
i am trying to install the fhir-api server and database using the docker-compose command and following the instructions report in the documentation (https://github.com/microsoft/fhir-server/tree/main/samples/docker):
```
Using docker-compose this image can be started with the following steps:
Open a terminal window.
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](https://docs.microsoft.com/en-us/sql/relational-databases/security/password-policy?view=sql-server-ver15#password-complexity).
Copy & save a local version of the docker-compose file from the release directory of the fhir-server project.
Run the command:
docker-compose up -d .
After giving the container a minute to start up it should be accessable at http://localhost:8080/metadata.
```
Unfortunately in the Log I have the following error which I think does not start the fhir-api server correctly.
```
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
fhir-server-fhir-api-1 | at System.Lazy`1.CreateValue()
fhir-server-fhir-api-1 | at Hl7.FhirPath.FhirPathCompiler.get_DefaultSymbolTable()
fhir-server-fhir-api-1 | at Microsoft.Health.Fhir.Api.Modules.FhirModule.Load(IServiceCollection services) in /repo/src/Microsoft.Health.Fhir.Shared.Api/Modules/FhirModule.cs:line 58
fhir-server-fhir-api-1 | at Microsoft.Health.Extensions.DependencyInjection.ServiceCollectionExtensions.RegisterModule(IServiceCollection collection, Type moduleType, Object[] constructorParams)
fhir-server-fhir-api-1 | at Microsoft.Health.Extensions.DependencyInjection.ServiceCollectionExtensions.RegisterAssemblyModules(IServiceCollection collection, Assembly assembly, Object[] constructorParams)
fhir-server-fhir-api-1 | at Microsoft.Extensions.DependencyInjection.FhirServerServiceCollectionExtensions.AddFhirServer(IServiceCollection services, IConfiguration configurationRoot, Action`1 configureAction) in /repo/src/Microsoft.Health.Fhir.Shared.Api/Registration/FhirServerServiceCollectionExtensions.cs:line 88
fhir-server-fhir-api-1 | at Microsoft.Health.Fhir.Web.Startup.ConfigureServices(IServiceCollection services) in /repo/src/Microsoft.Health.Fhir.Shared.Web/Startup.cs:line 45
fhir-server-fhir-api-1 | at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
fhir-server-fhir-api-1 | at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
fhir-server-fhir-api-1 | at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
fhir-server-fhir-api-1 | at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
fhir-server-fhir-api-1 | at Microsoft.AspNetCore.Hosting.StartupLoader.ConfigureServicesDelegateBuilder`1.<>c__DisplayClass14_0.g__ConfigureServicesWithContainerConfiguration|0(IServiceCollection services)
fhir-server-fhir-api-1 | at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
fhir-server-fhir-api-1 | at Microsoft.AspNetCore.Hosting.WebHost.EnsureApplicationServices()
fhir-server-fhir-api-1 | at Microsoft.AspNetCore.Hosting.WebHost.Initialize()
fhir-server-fhir-api-1 | at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
fhir-server-fhir-api-1 | at Microsoft.Health.Fhir.Web.Program.Main(String[] args) in /repo/src/Microsoft.Health.Fhir.Shared.Web/Program.cs:line 20
```
The full docker-compose file:
```
version: "3"
services:
fhir-api:
image: "mcr.microsoft.com/healthcareapis/r4-fhir-server"
restart: on-failure
environment:
FHIRServer__Security__Enabled: "false"
SqlServer__ConnectionString: "Server=tcp:sql,1433;Initial Catalog=FHIR;Persist Security Info=False;User ID=sa;Password=;MultipleActiveResultSets=False;Connection Timeout=30;TrustServerCertificate=true;"
SqlServer__AllowDatabaseCreation: "true"
SqlServer__Initialize: "true"
SqlServer__SchemaOptions__AutomaticUpdatesEnabled: "true"
DataStore: "SqlServer"
ports:
- "8080:8080"
depends_on:
- sql
sql:
image: "mcr.microsoft.com/mssql/server"
environment:
SA_PASSWORD:
ACCEPT_EULA: "Y"
healthcheck:
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd","-U sa -P -Q 'SELECT * FROM INFORMATION_SCHEMA.TABLES'"]
interval: 10s
timeout: 10s
retries: 6
```
My working environment is a Macbook M1 Pro with macOS Ventura 13.2.1.
The version of Docker is 20.10.23 (with _Use Virtualization framework_ and _Use Rosetta for x86/amd64 emulation on Apple Silicon_ checked)
**Is this environment supported for this version of the fhir server?**
Thanks for your support.
Contributor guide
Research direction
Start with the Docker Compose instructions in samples/docker and compare them with the provided compose file. Then inspect FhirModule.cs at line 58 and the startup locations in Startup.cs and Program.cs, using the reported container logs. Done means determining whether the documented setup supports this environment and, if applicable, updating the documentation or configuration so the server reaches /metadata.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, macos
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100