Skip to content

Tool to convert appsettings JSON files to Docker environment format

Notifications You must be signed in to change notification settings

EmilianoMusso/a2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

a2d - appsettings.json to Docker .env format

This small tool is useful to quickly translate dotnet appsettings.json files to Docker environment format

Sample

Input file sample

{
  "ConnectionStrings": {
    "MyConnection": "Data Source=localhost;Initial Catalog=Demo;Trusted_Connection=True;"
  },
  "SqlServer": {
    "MaxRetryCount": 30,
    "MaxRetryDelay": "00:05:00",
    "ErrorNumbersToAdd": [] 
  }
}

Output sample

ConnectionStrings__MyConnection=Data Source=localhost;Initial Catalog=Demo;Trusted_Connection=True;
SqlServer__MaxRetryCount=30
SqlServer__MaxRetryDelay=00:05:00

Usage

a2d.exe --appsettings <PATH_TO_YOUR_APPSETTINGS_FILE>

You can obviously redirect the output to a file like this

a2d.exe --appsettings <PATH_TO_YOUR_APPSETTINGS_FILE> > .env

About

Tool to convert appsettings JSON files to Docker environment format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages