stack: Force recreating containers on 'up' call
This commit is contained in:
parent
8a5b066839
commit
9f3e7a7b86
1 changed files with 2 additions and 2 deletions
|
|
@ -65,9 +65,9 @@ func (ds Stack) Update(ctx context.Context, progress io.Writer, start bool) erro
|
||||||
var errStackUp = errors.New("Stack.Up: Up returned non-zero exit code")
|
var errStackUp = errors.New("Stack.Up: Up returned non-zero exit code")
|
||||||
|
|
||||||
// Up creates and starts the containers in this Stack.
|
// Up creates and starts the containers in this Stack.
|
||||||
// It is equivalent to 'docker compose up --remove-orphans --detach' on the shell.
|
// It is equivalent to 'docker compose up --force-recreate --remove-orphans --detach' on the shell.
|
||||||
func (ds Stack) Up(ctx context.Context, progress io.Writer) error {
|
func (ds Stack) Up(ctx context.Context, progress io.Writer) error {
|
||||||
if code := ds.compose(ctx, stream.NonInteractive(progress), "up", "--remove-orphans", "--detach")(); code != 0 {
|
if code := ds.compose(ctx, stream.NonInteractive(progress), "up", "--force-recreate", "--remove-orphans", "--detach")(); code != 0 {
|
||||||
return errStackUp
|
return errStackUp
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue