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,12 +0,0 @@
|
|||
DATA_PATH=${DATA_PATH}
|
||||
RUNTIME_DIR=${RUNTIME_DIR}
|
||||
|
||||
SLUG=${SLUG}
|
||||
WISSKI_HOSTNAME=${HOSTNAME}
|
||||
HOST_RULE=${HOST_RULE}
|
||||
DOCKER_NETWORK_NAME=${DOCKER_NETWORK_NAME}
|
||||
|
||||
HTTPS_ENABLED=${HTTPS_ENABLED}
|
||||
|
||||
BARREL_BASE_IMAGE=${BARREL_BASE_IMAGE}
|
||||
OPCACHE_MODE=${OPCACHE_MODE}
|
||||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component"
|
||||
)
|
||||
|
||||
//go:embed all:barrel barrel.env
|
||||
//go:embed all:barrel
|
||||
var barrelResources embed.FS
|
||||
|
||||
// Barrel returns a stack representing the running WissKI Instance
|
||||
|
|
@ -19,15 +19,14 @@ func (barrel *Barrel) Stack() component.StackWithResources {
|
|||
|
||||
Resources: barrelResources,
|
||||
ContextPath: filepath.Join("barrel"),
|
||||
EnvPath: filepath.Join("barrel.env"),
|
||||
|
||||
EnvContext: map[string]string{
|
||||
"DOCKER_NETWORK_NAME": barrel.Malt.Config.Docker.Network(),
|
||||
|
||||
"SLUG": barrel.Slug,
|
||||
"HOST_RULE": barrel.HostRule(),
|
||||
"HOSTNAME": barrel.Hostname(),
|
||||
"HTTPS_ENABLED": barrel.Malt.Config.HTTP.HTTPSEnabledEnv(),
|
||||
"SLUG": barrel.Slug,
|
||||
"HOST_RULE": barrel.HostRule(),
|
||||
"WISSKI_HOSTNAME": barrel.Hostname(),
|
||||
"HTTPS_ENABLED": barrel.Malt.Config.HTTP.HTTPSEnabledEnv(),
|
||||
|
||||
"DATA_PATH": filepath.Join(barrel.FilesystemBase, "data"),
|
||||
"RUNTIME_DIR": barrel.Malt.Config.Paths.RuntimeDir(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue