Webwonders.Umbraco.DockerConfiguration
16.0.0
dotnet add package Webwonders.Umbraco.DockerConfiguration --version 16.0.0
NuGet\Install-Package Webwonders.Umbraco.DockerConfiguration -Version 16.0.0
<PackageReference Include="Webwonders.Umbraco.DockerConfiguration" Version="16.0.0" />
<PackageVersion Include="Webwonders.Umbraco.DockerConfiguration" Version="16.0.0" />
<PackageReference Include="Webwonders.Umbraco.DockerConfiguration" />
paket add Webwonders.Umbraco.DockerConfiguration --version 16.0.0
#r "nuget: Webwonders.Umbraco.DockerConfiguration, 16.0.0"
#:package Webwonders.Umbraco.DockerConfiguration@16.0.0
#addin nuget:?package=Webwonders.Umbraco.DockerConfiguration&version=16.0.0
#tool nuget:?package=Webwonders.Umbraco.DockerConfiguration&version=16.0.0
Webwonders.Umbraco.DockerConfiguration
Webwonders.Umbraco.DockerConfiguration
is a lightweight NuGet package to simplify Docker-based SQL Server configuration for Umbraco 13+ projects. It automates Docker setup, connection string generation, and ensures compatibility with Umbraco.
Features
- Detects and validates Docker installation and status.
- Generates and starts a Docker Compose file for SQL Server.
- Automatically configures the Umbraco connection string.
- Supports seamless integration with
launchSettings.json
.
Installation
To install the package, run:
Install-Package Webwonders.Umbraco.DockerConfiguration
Or, using the .NET CLI:
dotnet add package Webwonders.Umbraco.DockerConfiguration
Usage
Add the middleware to your IConfigurationBuilder
in Program.cs
:
using Webwonders.Umbraco.DockerConfiguration;
var builder = WebApplication.CreateBuilder(args);
// Enable Docker-based SQL Server configuration
DockerConfigurationMiddleware.ConfigureDockerSqlDb(builder.Configuration);
// Continue building the app...
Prerequisites
- Ensure Docker Desktop is installed and running.
- Add the following environment variables to
launchSettings.json
under theUmbracoProject
profile:
"environmentVariables": {
"Use_Local_Docker_SQL": "true",
"Local_Docker_DB_NAME": "MyDatabase",
"Local_Docker_PASSWORD": "YourStrongPassword123",
"Local_Docker_PORT": "1433"
}
How It Works
- Docker Validation: Checks if Docker is installed and running.
- Docker Compose Generation: Creates a
docker-compose.yml
file for SQL Server. - Connection String Configuration: Adds the SQL Server connection string dynamically to the Umbraco configuration.
Contributing
Contributions are welcome! Please submit a pull request or open an issue on GitHub.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3.0)
- Microsoft.Extensions.Configuration (>= 9.0.1)
- Umbraco.Cms.Core (>= 13.0.0 && < 15.0.0)
-
net9.0
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3.0)
- Microsoft.Extensions.Configuration (>= 9.0.1)
- Umbraco.Cms.Core (>= 16.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.