Webwonders.Umbraco.DockerConfiguration 2.0.1

dotnet add package Webwonders.Umbraco.DockerConfiguration --version 2.0.1                
NuGet\Install-Package Webwonders.Umbraco.DockerConfiguration -Version 2.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Webwonders.Umbraco.DockerConfiguration" Version="2.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Webwonders.Umbraco.DockerConfiguration --version 2.0.1                
#r "nuget: Webwonders.Umbraco.DockerConfiguration, 2.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Webwonders.Umbraco.DockerConfiguration as a Cake Addin
#addin nuget:?package=Webwonders.Umbraco.DockerConfiguration&version=2.0.1

// Install Webwonders.Umbraco.DockerConfiguration as a Cake Tool
#tool nuget:?package=Webwonders.Umbraco.DockerConfiguration&version=2.0.1                

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

  1. Ensure Docker Desktop is installed and running.
  2. Add the following environment variables to launchSettings.json under the UmbracoProject profile:
"environmentVariables": {
  "Use_Local_Docker_SQL": "true",
  "Local_Docker_DB_NAME": "MyDatabase",
  "Local_Docker_PASSWORD": "YourStrongPassword123",
  "Local_Docker_PORT": "1433"
}

How It Works

  1. Docker Validation: Checks if Docker is installed and running.
  2. Docker Compose Generation: Creates a docker-compose.yml file for SQL Server.
  3. 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 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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.1 66 1/27/2025
2.0.0 55 1/27/2025
1.0.1 45 1/24/2025