Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultComposeCommand = "docker compose" DefaultRuntimeCommand = "docker" DefaultTraefikPort = 80 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Command Command `yaml:"command"`
Traefik Traefik `yaml:"traefik"`
Services map[string]ServiceConfig `yaml:"services"`
}
func Load ¶
Load reads config from .tug.yaml in projectDir (project-local) and globalPath (global), merging with project-local taking priority over global. Both files are optional; missing files are silently ignored.
func LoadDefault ¶
LoadDefault loads config using the current directory and the standard global config path (~/.config/tug.yaml).
type ServiceConfig ¶
type ServiceConfig struct {
Kind string `yaml:"kind"` // default kind: "http" or "tcp"
Ports map[uint16]string `yaml:"ports"` // per-port kind override: containerPort → "http" | "tcp"
}
ServiceConfig holds per-service overrides.
func (*ServiceConfig) UnmarshalYAML ¶
func (s *ServiceConfig) UnmarshalYAML(unmarshal func(any) error) error
Click to show internal directories.
Click to hide internal directories.