예제 #1
0
        // Configure application configuration providers.  When running within Docker,
        // the configuration settings will be read from environment variables.
        private static void SetupConfiguration(
            WebHostBuilderContext context,
            string[] args,
            IConfigurationBuilder configBuilder)
        {
            // Settings contained within the appsettings.json file are only to be used
            // as a developer convenience.  In other environments, the settings are to
            // be specified using docker environment variables.
            if (EnvironmentConfig.IsDevelopment)
            {
                configBuilder.AddDefaultAppSettings();
            }

            configBuilder.AddEnvironmentVariables();
            configBuilder.AddCommandLine(args);
        }