wisski-cloud-distillery/env/stack.go
Tom Wiesing 2a14d93d3c
Implement initial 'wdcli backup_instance' command
This commit performs an initial implementation of the 'backup_instance'
command.
2022-09-08 14:39:04 +02:00

32 lines
863 B
Go

package env
import (
"path/filepath"
"github.com/FAU-CDI/wisski-distillery/internal/stack"
)
// TODO: Move everything into specific subpackages
// Stacks returns the Stacks of this distillery
func (dis *Distillery) Stacks() []stack.Installable {
// TODO: Do we want to cache these stacks?
return []stack.Installable{
dis.WebStack(),
dis.SelfStack(),
dis.ResolverStack(),
dis.SSHStack(),
dis.TriplestoreStack(),
dis.SQLStack(),
}
}
// asCoreStack treats the provided stack as a core component of this distillery.
func (dis *Distillery) asCoreStack(name string, stack stack.Installable) stack.Installable {
stack.Dir = filepath.Join(dis.Config.DeployRoot, "core", name)
stack.ContextResource = filepath.Join("resources", "compose", name)
stack.EnvFileResource = filepath.Join("resources", "templates", "docker-env", name)
return stack
}