Skip to content

fixing up docker issues from dev environment #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ COPY --from=build /tools /opt/dotnetcore-tools
EXPOSE 104
EXPOSE 5000

RUN mkdir /database/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mapped into the container, and that's why we don't create it in the Dockefile.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right ok, so this should be a volume mount point then.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, it's a mount point. Can we remove this so that it doesn't become a silent failure?


RUN ls -lR /opt/monai/ig
ENV PATH="/opt/dotnetcore-tools:${PATH}"

Expand Down
2 changes: 1 addition & 1 deletion src/Api/Monai.Deploy.InformaticsGateway.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<PackageReference Include="Macross.Json.Extensions" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="6.0.6" />
<PackageReference Include="Monai.Deploy.Messaging" Version="0.1.2" />
<PackageReference Include="Monai.Deploy.Storage" Version="0.1.1" />
<PackageReference Include="Monai.Deploy.Storage" Version="0.2.0-rc0014" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="Monai.Deploy.Messaging" Version="0.1.2" />
<PackageReference Include="Monai.Deploy.Storage" Version="0.1.1" />
<PackageReference Include="Monai.Deploy.Storage" Version="0.2.0-rc0014" />
<PackageReference Include="System.IO.Abstractions" Version="17.0.18" />
</ItemGroup>

Expand Down
28 changes: 27 additions & 1 deletion src/InformaticsGateway/Monai.Deploy.InformaticsGateway.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="Monai.Deploy.Storage" Version="0.1.1" />
<PackageReference Include="Monai.Deploy.Messaging.RabbitMQ" Version="0.2.0-rc0046" />
<PackageReference Include="Monai.Deploy.Storage" Version="0.2.0-rc0014" />
<PackageReference Include="Monai.Deploy.Storage.MinIO" Version="0.2.0-rc0014" />
<PackageReference Include="Monai.Deploy.Storage.S3Policy" Version="0.2.0-rc0014" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.1" />
</ItemGroup>
Expand Down Expand Up @@ -78,4 +81,27 @@
<None Include="./appsettings.json" CopyToOutputDirectory="Always" />
<None Include="./appsettings.Development.json" CopyToOutputDirectory="Always" />
</ItemGroup>

<ItemGroup>
<None Update="appsettings.Local.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

<Target Name="CopyPlugins" AfterTargets="publish">
<ItemGroup>
<PluginDlls Include="$(PublishDir)Monai.Deploy.Messaging.RabbitMQ.dll;$(PublishDir)Monai.Deploy.Storage.MinIO.dll" />
</ItemGroup>
<Copy SourceFiles="@(PluginDlls)" DestinationFolder="$(PublishDir)\plug-ins\" SkipUnchangedFiles="true" />
<Message Text="Files copied successfully to $(PublishDir)\plug-ins\." Importance="high" />
</Target>

<Target Name="CopyPluginsBuild" AfterTargets="build">
<ItemGroup>
<PluginDlls Include="$(OutDir)Monai.Deploy.Messaging.RabbitMQ.dll;$(OutDir)Monai.Deploy.Storage.MinIO.dll" />
</ItemGroup>
<Copy SourceFiles="@(PluginDlls)" DestinationFolder="$(OutDir)\plug-ins\" SkipUnchangedFiles="true" />
<Message Text="Files copied successfully to $(OutDir)\plug-ins\." Importance="high" />
</Target>

</Project>
3 changes: 2 additions & 1 deletion src/InformaticsGateway/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ internal static IHostBuilder CreateHostBuilder(string[] args) =>
var env = builderContext.HostingEnvironment;
config
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true);
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables();
})
.ConfigureLogging((builderContext, configureLogging) =>
{
Expand Down
2 changes: 1 addition & 1 deletion src/InformaticsGateway/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Monai.Deploy.InformaticsGateway": {
"commandName": "Project",
"environmentVariables": {
"DOTNET_ENVIRONMENT": "Development"
"DOTNET_ENVIRONMENT": "Local"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any difference between using Local vs Development?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in MWM tests were/are using appsetting.development.json to read settings from (bad Idea!) so making a copy of it and using that for local development only was my solution (as my machine has services running on different ports)
happy to revert this file, if you think thats best

}
}
}
Expand Down
61 changes: 61 additions & 0 deletions src/InformaticsGateway/appsettings.Local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"ConnectionStrings": {
"InformaticsGatewayDatabase": "Data Source=migdev.db"
},
"InformaticsGateway": {
"dicom": {
"scp": {
"port": 1104,
"rejectUnknownSources": false
}
},
"messaging": {
"publisherSettings": {
"endpoint": "localhost",
"username": "admin",
"password": "admin",
"port": "30072",
"virtualHost": "monaideploy",
"exchange": "monaideploy"
},
"subscriberSettings": {
"endpoint": "localhost",
"username": "admin",
"password": "admin",
"port": "30072",
"virtualHost": "monaideploy",
"exchange": "monaideploy",
"exportRequestQueue": "export_tasks"
}
},
"storage": {
"temporary": "./payloads",
"settings": {
"endpoint": "minio:9000",
"accessKey": "admin",
"accessToken": "password",
"securedConnection": false
}
}
},
"Logging": {
"LogLevel": {
"Dicom": "Information",
"Monai": "Debug",
"Microsoft": "Information",
"Microsoft.EntityFrameworkCore": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker": "Information"
},
"Console": {
"FormatterName": "Simple",
"FormatterOptions": {
"ColorBehavior": "Enabled",
"IncludeScopes": true,
"SingleLine": false,
"TimestampFormat": " HH:mm:ss ",
"UseUtcTimestamp": false
}
}
}
}
14 changes: 7 additions & 7 deletions tests/Integration.Test/Features/AcrApi.feature.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 25 additions & 25 deletions tests/Integration.Test/Features/DicomDimseScp.feature.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions tests/Integration.Test/Features/DicomDimseScu.feature.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/Integration.Test/Features/DicomWebExport.feature.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading