Beispiel #1
0
func (gaudi *Gaudi) StartApplications(rebuild bool) {
	// Notify user to rebuild
	if rebuild == false && gaudi.shouldRebuild() {
		util.PrintOrange("Changes detected in the configuration file, please consider to rebuild containers with `gaudi rebuild`.")
	}

	gaudi.Applications.Start(rebuild)
}
Beispiel #2
0
/**
 * Check if all applications are started
 */
func (gaudi *Gaudi) Check() {
	images, err := docker.SnapshotProcesses()
	if err != nil {
		util.LogError(err)
	}

	for _, currentContainer := range gaudi.Applications {
		if containerId, ok := images[currentContainer.Image]; ok {
			currentContainer.Id = containerId
			currentContainer.RetrieveIp()

			util.PrintOrange("Application", currentContainer.Name, "is running", "("+currentContainer.Ip+":"+currentContainer.GetFirstPort()+")")
		} else {
			util.PrintOrange("Application", currentContainer.Name, "is not running")
		}
	}
}
Beispiel #3
0
func (gaudi *Gaudi) StartApplications(rebuild bool) {
	// Force rebuild if needed
	if rebuild == false {
		rebuild = gaudi.shouldRebuild()

		if rebuild {
			util.PrintOrange("Changes detected in configuration file, rebuilding containers ...")
		}
	}

	gaudi.Applications.Start(rebuild)
}