Discover Packages
github.com/cdvelop/compose
package
module
Version:
v0.0.5
Opens a new window with list of versions in this module.
Published: Jan 5, 2025
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
docker-compose - Go Package
A Go package that allows you to create and manage Docker Compose configurations programmatically.
Installation
go get github.com/cdvelop/compose
Basic Usage in docker-compose_test.go
Main Features
Programmatic creation of docker-compose.yml files
Support for defining services, networks and volumes
Automatic configuration validation
Dynamic configuration generation
Integration with other Go tools
License
This project is licensed under the MIT License - see the LICENSE file for more details.
Expand ▾
Collapse ▴
Documentation
¶
AddEnvToFile adds environment variables to .env file and ensures .gitignore is properly configured
envPath and gitignorePath are optional, defaulting to ".env" and ".gitignore" respectively
func NewCompose(version string , services ...service) (*composeConfig, error )
NewCompose crea una nueva configuración de docker-compose
func NewService(name string ) *service
NewService crea una nueva configuración de servicio
type Volume struct {
Source string `yaml:"-"`
Target string `yaml:"-"`
}
Volume representa un volumen en docker-compose
Source Files
¶
Click to show internal directories.
Click to hide internal directories.