stack: Do not use templates for env files
This commit removes the templating logic for writing .env files. Instead it simply writes a key-value directory directly to the destined file.
This commit is contained in:
parent
46b16e5700
commit
588cb7ebaa
22 changed files with 180 additions and 121 deletions
|
|
@ -1,5 +0,0 @@
|
|||
SLUG=${SLUG}
|
||||
HOST_RULE=${HOST_RULE}
|
||||
|
||||
DOCKER_NETWORK_NAME=${DOCKER_NETWORK_NAME}
|
||||
HTTPS_ENABLED=${HTTPS_ENABLED}
|
||||
|
|
@ -14,7 +14,7 @@ type Reserve struct {
|
|||
ingredient.Base
|
||||
}
|
||||
|
||||
//go:embed all:reserve reserve.env
|
||||
//go:embed all:reserve
|
||||
var reserveResources embed.FS
|
||||
|
||||
// Stack returns a stack representing the reserve instance
|
||||
|
|
@ -26,14 +26,12 @@ func (reserve *Reserve) Stack() component.StackWithResources {
|
|||
|
||||
Resources: reserveResources,
|
||||
ContextPath: filepath.Join("reserve"),
|
||||
EnvPath: filepath.Join("reserve.env"),
|
||||
|
||||
EnvContext: map[string]string{
|
||||
"DOCKER_NETWORK_NAME": reserve.Malt.Config.Docker.Network(),
|
||||
|
||||
"SLUG": reserve.Slug,
|
||||
"HOST_RULE": reserve.HostRule(),
|
||||
"HOSTNAME": reserve.Hostname(),
|
||||
"HTTPS_ENABLED": reserve.Malt.Config.HTTP.HTTPSEnabledEnv(),
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue