config/network: Prepare for multiple networks

This commit futures proofs the code to allow for usage of more than one
docker network.
This commit is contained in:
Tom Wiesing 2023-03-13 10:10:37 +01:00
parent db1989a299
commit e969351f8e
No known key found for this signature in database
13 changed files with 40 additions and 28 deletions

View file

@ -82,7 +82,7 @@ func (binder *Binder) Stack() component.StackWithResources {
},
EnvContext: map[string]string{
"DOCKER_NETWORK_NAME": binder.Config.Docker.Network,
"DOCKER_NETWORK_NAME": binder.Config.Docker.Network(),
},
})
}

View file

@ -25,7 +25,7 @@ func (server *Server) Stack() component.StackWithResources {
EnvPath: "server.env",
EnvContext: map[string]string{
"DOCKER_NETWORK_NAME": server.Config.Docker.Network,
"DOCKER_NETWORK_NAME": server.Config.Docker.Network(),
"HOST_RULE": server.Config.HTTP.DefaultHostRule(),
"HTTPS_ENABLED": server.Config.HTTP.HTTPSEnabledEnv(),

View file

@ -39,7 +39,7 @@ func (solr *Solr) Stack() component.StackWithResources {
EnvPath: "solr.env",
EnvContext: map[string]string{
"DOCKER_NETWORK_NAME": solr.Config.Docker.Network,
"DOCKER_NETWORK_NAME": solr.Config.Docker.Network(),
},
MakeDirs: []string{

View file

@ -46,7 +46,7 @@ func (sql *SQL) Stack() component.StackWithResources {
EnvPath: "sql.env",
EnvContext: map[string]string{
"DOCKER_NETWORK_NAME": sql.Config.Docker.Network,
"DOCKER_NETWORK_NAME": sql.Config.Docker.Network(),
"HTTPS_ENABLED": sql.Config.HTTP.HTTPSEnabledEnv(),
},

View file

@ -22,7 +22,7 @@ func (ssh *SSH2) Stack() component.StackWithResources {
EnvPath: "ssh2.env",
EnvContext: map[string]string{
"DOCKER_NETWORK_NAME": ssh.Config.Docker.Network,
"DOCKER_NETWORK_NAME": ssh.Config.Docker.Network(),
"HOST_RULE": ssh.Config.HTTP.DefaultHostRule(),
"CONFIG_PATH": ssh.Config.ConfigPath,

View file

@ -44,7 +44,7 @@ func (ts *Triplestore) Stack() component.StackWithResources {
EnvPath: "triplestore.env",
EnvContext: map[string]string{
"DOCKER_NETWORK_NAME": ts.Config.Docker.Network,
"DOCKER_NETWORK_NAME": ts.Config.Docker.Network(),
},
MakeDirs: []string{

View file

@ -43,7 +43,7 @@ func (web *Web) Stack() component.StackWithResources {
stack.EnvPath = "web.env"
stack.EnvContext = map[string]string{
"DOCKER_NETWORK_NAME": web.Config.Docker.Network,
"DOCKER_NETWORK_NAME": web.Config.Docker.Network(),
"CERT_EMAIL": web.Config.HTTP.CertbotEmail,
}