Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/g41797/starter
Creates, starts and stops all the services from docker-compose.yml file
https://github.com/g41797/starter
docker-compose-programmatically sputnik syslog-sidecar
Last synced: about 2 months ago
JSON representation
Creates, starts and stops all the services from docker-compose.yml file
- Host: GitHub
- URL: https://github.com/g41797/starter
- Owner: g41797
- License: mit
- Created: 2023-10-06T18:03:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-07T09:20:38.000Z (about 1 year ago)
- Last Synced: 2023-10-07T19:29:12.182Z (about 1 year ago)
- Topics: docker-compose-programmatically, sputnik, syslog-sidecar
- Language: Go
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# starter
[![Go](https://github.com/g41797/starter/actions/workflows/go.yml/badge.svg)](https://github.com/g41797/starter/actions/workflows/go.yml)
*starter* is part of [sputnik](https://github.com/g41797/sputnik#readme).
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
```bash
./cmd/syslog-e2e/conf
├── blocks.json
├── connector.json
├── docker-compose.yml
├── syslogproducer.json
└── syslogreceiver.json
```
- import starter
```go
import (
..........................
"github.com/g41797/starter"
..........................
)
```- call starter from the very beginning
```go
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:
```go
stop, err := starter.StartServicesWithCompose(composePath)
```
where *composePath* is full path of docker-compose.yml.