Application deployment has a flag to indicate which apps and in which order have to be deployed.
Maybe having a similar flag for domain would be useful. (in a separate JIRA issue)