There is no way to specify a restart policy on a container. This means for example, that when the host restarts, the netbox-docker-agent is not restarted automatically, and you can't restart it from Netbox since the agent is not there to start it (oopsie).
Desired Behavior
According to the documentation, we can configure a container to be restarted:
no: never
on-failure[:max-retries]: when it crashes (retry at least max-retries)
always: which is what you would want for the netbox-docker-agent container
unless-stopped: same as always except if manually stopped
A field should be added to the Container model, as an enumeration, to define the restart policy. The default value should be no.
Another field should be added for the max-retries as well.
Actual Behavior
There is no way to specify a restart policy on a container. This means for example, that when the host restarts, the
netbox-docker-agent
is not restarted automatically, and you can't restart it from Netbox since the agent is not there to start it (oopsie).Desired Behavior
According to the documentation, we can configure a container to be restarted:
no
: neveron-failure[:max-retries]
: when it crashes (retry at leastmax-retries
)always
: which is what you would want for thenetbox-docker-agent
containerunless-stopped
: same asalways
except if manually stoppedA field should be added to the
Container
model, as an enumeration, to define the restart policy. The default value should beno
. Another field should be added for themax-retries
as well.