feat: set restart policy for all services to always

This commit is contained in:
Pavel Sviderski
2025-02-19 16:53:55 +10:00
parent bcb67a4073
commit d9897e5d1e
2 changed files with 26 additions and 8 deletions
+5
View File
@@ -85,6 +85,11 @@ func (cli *Client) CreateContainer(
Binds: spec.Container.Volumes,
Init: spec.Container.Init,
PortBindings: portBindings,
// Always restart service containers if they exit or a machine restarts.
// For one-off containers and batch jobs we plan to use a different service type/mode.
RestartPolicy: container.RestartPolicy{
Name: container.RestartPolicyAlways,
},
}
netConfig := &network.NetworkingConfig{
EndpointsConfig: map[string]*network.EndpointSettings{