mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-27 19:43:34 +00:00
feat(pre-deploy): add support for pre-deploy hook containers in service management, sync *all* containers to store
This commit is contained in:
+8
-5
@@ -454,8 +454,8 @@ type PreDeployHook struct {
|
||||
Command []string
|
||||
// Env defines additional environment variables for the container, merged with the service's environment variables.
|
||||
Env EnvVars `json:",omitempty"`
|
||||
// Privileged gives extended privileges to the container.
|
||||
Privileged bool `json:",omitempty"`
|
||||
// Privileged overrides the container's privileged mode. nil means inherit from the service.
|
||||
Privileged *bool `json:",omitempty"`
|
||||
// Timeout is the maximum duration to wait for the command to complete. On timeout, the container is stopped
|
||||
// and the deployment fails. If nil, a default timeout is used.
|
||||
Timeout *time.Duration `json:",omitempty"`
|
||||
@@ -505,10 +505,13 @@ type RunServiceResponse struct {
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
ID string
|
||||
Name string
|
||||
Mode string
|
||||
ID string
|
||||
Name string
|
||||
Mode string
|
||||
// Containers is the regular long-running service containers.
|
||||
Containers []MachineServiceContainer
|
||||
// HookContainers are one-shot containers for deployment hooks (e.g. pre-deploy).
|
||||
HookContainers []MachineServiceContainer
|
||||
}
|
||||
|
||||
type MachineServiceContainer struct {
|
||||
|
||||
Reference in New Issue
Block a user