Skip to content

g41797/starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

starter

Go

starter is part of sputnik. It's placed in the separate repository due to high requirements for golang version (1.21).

"...Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application's services. Then, with a single command, you create and start all the services from your configuration..."

starter performs functionality described above programmatically:

  • store docker-compose.yml within configuration folder
./cmd/syslog-e2e/conf
├── blocks.json
├── connector.json
├── docker-compose.yml
├── syslogproducer.json
└── syslogreceiver.json
  • import starter
import (
    ..........................
    "github.com/g41797/starter"
    ..........................
)
  • call starter from the very beginning
func main() {

	stop, err := starter.StartServices()

	if err != nil {
		fmt.Println(err)
		return
	}

	defer stop()

	sidecar.Start(new(adapter.BrokerConnector))
}

Instead of StartServices you can call:

	stop, err := starter.StartServicesWithCompose(composePath)

where composePath is full path of docker-compose.yml.

About

Creates, starts and stops all the services from docker-compose.yml file

Topics

Resources

License

Stars

Watchers

Forks

Languages