Update codex container recipe
This commit is contained in:
parent
b7904f7ee0
commit
a6a8c3f1e7
@ -105,7 +105,6 @@ namespace CodexPlugin
|
||||
|
||||
AddEnvVar("CODEX_ETH_PROVIDER", $"{wsAddress.Host.Replace("http://", "ws://")}:{wsAddress.Port}");
|
||||
AddEnvVar("CODEX_MARKETPLACE_ADDRESS", marketplaceAddress);
|
||||
AddEnvVar("CODEX_PERSISTENCE", "true");
|
||||
|
||||
// Custom scripting in the Codex test image will write this variable to a private-key file,
|
||||
// and pass the correct filename to Codex.
|
||||
@ -113,7 +112,9 @@ namespace CodexPlugin
|
||||
AddEnvVar("PRIV_KEY", mStart.PrivateKey);
|
||||
Additional(mStart);
|
||||
|
||||
if (config.MarketplaceConfig.IsValidator)
|
||||
var marketplaceSetup = config.MarketplaceConfig.MarketplaceSetup;
|
||||
SetCommandOverride(marketplaceSetup);
|
||||
if (marketplaceSetup.IsValidator)
|
||||
{
|
||||
AddEnvVar("CODEX_VALIDATOR", "true");
|
||||
}
|
||||
@ -125,6 +126,21 @@ namespace CodexPlugin
|
||||
}
|
||||
}
|
||||
|
||||
private void SetCommandOverride(MarketplaceSetup ms)
|
||||
{
|
||||
var persistenceRequired = ms.IsClientNode || ms.IsStorageNode || ms.IsValidator;
|
||||
var proverRequired = ms.IsStorageNode;
|
||||
|
||||
if (persistenceRequired && proverRequired)
|
||||
{
|
||||
OverrideCommand("codex", "persistence", "prover");
|
||||
}
|
||||
else if (persistenceRequired)
|
||||
{
|
||||
OverrideCommand("codex", "persistence");
|
||||
}
|
||||
}
|
||||
|
||||
private Port CreateApiPort(CodexStartupConfig config, string tag)
|
||||
{
|
||||
if (config.PublicTestNet == null) return AddExposedPort(tag);
|
||||
|
Loading…
x
Reference in New Issue
Block a user