Move runtime around

This commit is contained in:
Tom Wiesing 2022-09-14 14:42:21 +02:00
parent ef1243ea39
commit feacd4eeae
No known key found for this signature in database
18 changed files with 39 additions and 35 deletions

View file

@ -26,11 +26,6 @@ type Component interface {
// By convention it is /var/www/deploy/internal/core/${Name()}
Path() string
// Stack can be used to gain access to the "docker compose" stack.
//
// This should internally call
Stack() Installable
// Context returns a new InstallationContext to be used during installation from the command line.
// Typically this should just pass through the parent, but might perform other tasks.
Context(parent InstallationContext) InstallationContext
@ -40,6 +35,16 @@ type Component interface {
Base() *ComponentBase
}
// ComponentWithStack implements a component with a Stack method.
type ComponentWithStack interface {
Component
// Stack can be used to gain access to the "docker compose" stack.
//
// This should internally call
Stack() Installable
}
// ComponentBase implements base functionality for a component
type ComponentBase struct {
Dir string // Dir is the directory this component lives in