diff --git a/server/internal/orchestrator/swarm/postgres_service.go b/server/internal/orchestrator/swarm/postgres_service.go index 7ec3c099..180390f3 100644 --- a/server/internal/orchestrator/swarm/postgres_service.go +++ b/server/internal/orchestrator/swarm/postgres_service.go @@ -159,7 +159,10 @@ func (s *PostgresService) Delete(ctx context.Context, rc *resource.Context) erro Wait: true, WaitTimeout: time.Minute, }) - if err != nil { + if errors.Is(err, docker.ErrNotFound) { + // Service is already deleted. + return nil + } else if err != nil { return fmt.Errorf("failed to scale down postgres service before removal: %w", err) }