-
-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Binner version
v2.6.18
Operating System
Docker
Describe the bug and the steps to reproduce it
-
According to both https://hub.docker.com/r/binnerofficial/binner and https://github.com/replaysMike/Binner/wiki/Docker I'm supposed to set
BINNER_PROVIDER
to change db.
But according topublic const string StorageProviderName = "BINNER_DB_PROVIDER"; // Name of the storage provider BINNER_DB_PROVIDER
-
This one I'm not that certain in, because I'm struggling to read C#. This seems to access a dictionary by plain keys like
Host
:
Binner/Binner/Binner.Web/Database/ConnectionStringConstructor.cs
Lines 18 to 21 in e6a0f4f
var host = configuration.ProviderConfiguration .Where(x => x.Key == "Host") .Select(x => x.Value) .FirstOrDefault();
While this sets dictionary by using env var names, likeBINNER_DB_HOST
:
Binner/Binner/Library/Binner.Model/Configuration/EnvironmentVarConstants.cs
Lines 55 to 57 in e6a0f4f
var dbHost = System.Environment.GetEnvironmentVariable(EnvironmentVarConstants.StorageProviderHost); if (!string.IsNullOrEmpty(dbHost)) storageProviderConfig.ProviderConfiguration[EnvironmentVarConstants.StorageProviderHost] = dbHost;
So if I'm correct those env vars are never actually read. Currently I'm getting an error sayingHost can't be null
, even though env shows otherwise:
> echo $BINNER_DB_HOST
binner-pg-rw
(Don't worry about host name being weird, k8s DNS handles that fine)
Would you like to attach your appsetings.json configuration?
No response
Screenshots or Videos (Optional, but they help!)
No response
Are you able to contribute a PR? (No is ok!)
None
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working