Skip to main content

23 posts tagged with "Configuration"

Application Configuration and Settings Management

View All Tags

How to Keep Passwords Out of compose.yaml with an .env File

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

A password typed into compose.yaml ends up in Git, and then in every copy of the repository. Docker Compose can read passwords from a separate .env file instead, and with one small piece of syntax it refuses to start when they're missing. This guide sets that up for a MySQL container, with the real output of every check.

How to Run Code Only in Development in ASP.NET Core

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

Some code belongs only on a developer's machine: an in-memory store, a relaxed setting, a debugging aid. ASP.NET Core knows which environment it runs in, and one if around builder.Environment.IsDevelopment() keeps that code out of everywhere else. This guide shows the check, where to put it, and how to try the other branch on your own machine.

How to Read from appsettings.json in ASP.NET Core (C#)

· 9 min read
Jagdish Kumawat
Founder @ Dewiride

appsettings.json is where an ASP.NET Core app keeps its settings — connection strings, API base URLs, feature flags, timeouts. Reading those values comes down to one service, IConfiguration, which ASP.NET Core registers for you. In a console app you build the same thing yourself in a few lines.

This guide covers both, on .NET 10.