Skip to content

Issues with multiple config files #722

@yorek

Description

@yorek

I have two configuration files:

  • todo-backend.dab-config.Development.json
  • todo-backend.dab-config.json

if I run DAB after having set the DAB_ENVIROMENT variable to Development I would expect both files to be used, with the todo-backend.dab-config.Development.json overwriting any configuration options specified in the base todo-backend.dab-config.json.

This is not happening (using PowerShell):

 $Env:DAB_ENVIRONMENT="Development" ; dab start --config .\todo-backend.dab-config.json

the result is:

Using config file: .\todo-backend.dab-config.json
Starting the runtime engine...
info: Azure.DataApiBuilder.Service.Configurations.RuntimeConfigProvider[0]
      Using file .\todo-backend.dab-config.json to configure the runtime.
info: Azure.DataApiBuilder.Service.Configurations.RuntimeConfigProvider[0]
      Runtime configuration has been successfully loaded.
info: Azure.DataApiBuilder.Service.Configurations.RuntimeConfigProvider[0]
      Runtime config loaded from file.

Having the configuration file loaded correctly, is critical as I can have my base file using something like:

  "$schema": "../../schemas/dab.draft-01.schema.json",
  "data-source": {
    "database-type": "mssql",
    "connection-string": "@env('AZURE_CONNECTION_STRING')"
  },

that would be perfect when running in Azure, but when running locally I'd like to use the local development file where the connection string is pointing to my local database (and the mode setting is set to Development instead of Production)

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions