planetarium / planet-node

A simple node implementation using Libplanet
GNU Affero General Public License v3.0
7 stars 13 forks source link

planet-node should be able to execute the appsettings.json file of the execution environment. #19

Closed sensecodevalue closed 1 year ago

sensecodevalue commented 2 years ago

If you run two or more planet-nodes in the local environment, you must be able to run appsettings.json differently for each node.

This is a simple solution. But it is not perfect and needs to be improved.

// ../planet-node/PlanetNode/Program.cs
app.AddCommand(() =>
{
  string configPath = Environment.GetEnvironmentVariable("PN_CONFIG_FILE") ?? "appsettings.json";
  var configurationBuilder = new ConfigurationBuilder()
      .AddJsonFile(configPath)
      .AddEnvironmentVariables("PN_");
// terminal
PN_StorePath="/tmp/planet-node" PN_CONFIG_FILE="appsettings.env.json" dotnet run --project PlanetNode
longfin commented 1 year ago

@sensecodevalue Would it be okay to think this PR solved by #24? (or, is there any remaining task?)

sensecodevalue commented 1 year ago

@sensecodevalue Would it be okay to think this PR solved by #24? (or, is there any remaining task?)

yes! solved in #24