PreDeploy Tasks¶
PreDeploy tasks are tasks that are run sequentially before your services are deployed. Tasks must succeed, otherwise the whole deployment will be halted.
predeploy:
- name: migrations
command: ["bundle", "exec", "rake", "db:migrate"]
- name: warm-caches
command: ["bundle", "exec", "rake", "caches:warm"]
Fields¶
name
- (required)-
Name for your task. This should be short. This name must be unique across all services, tasks, cronjobs, predeploys
command
- (recommended)-
The command you want to run for this task. This field is not required, but it doesn't make much sense to exclude it.
For details on how to specify a command, see Specifying Command/EntryPoints
timeout
-
Set a custom timeout for this task. if the task does not complete within the allotted time, it will be killed and considered as a failure.
Note: this is the total launch time + runtime. so if you have a massive image, that will count against the timeout
Default: inherit from
settings.predeploy_timeout
disabled
-
Skip running this task. This allows you to easily skip certain tasks while still keeping them in the configuration
Default:
false
ignore_failure
-
If you want to run a task, but do not care if it fails, then set this to true. Usually you will not want this.
Default:
false
<anything from common>
-
See Common Task Options.