示例#1
0
文件: gaudi.go 项目: hungld/gaudi
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)
}
示例#2
0
文件: gaudi.go 项目: hungld/gaudi
/**
 * 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")
		}
	}
}
示例#3
0
文件: gaudi.go 项目: rayleyva/gaudi
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)
}