config

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: Apache-2.0, MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config loads and validates a skiff.toml describing a single app.

Index

Constants

View Source
const DefaultFile = "skiff.toml"

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildConfig

type BuildConfig struct {
	Dockerfile string `toml:"dockerfile"`
	Port       int    `toml:"port"`

	// Optional recipe overrides — set start or static to skip auto-detection
	// and build from these instead of a Dockerfile.
	Base    string `toml:"base"`
	Install string `toml:"install"`
	Build   string `toml:"build"`
	Start   string `toml:"start"`
	Static  string `toml:"static"`
}

type Config

type Config struct {
	Name     string `toml:"name"`
	Replicas int    `toml:"replicas"` // how many identical containers to run behind the router

	Server    ServerConfig      `toml:"server"`
	Build     BuildConfig       `toml:"build"`
	Deploy    DeployConfig      `toml:"deploy"`
	Resources ResourcesConfig   `toml:"resources"`
	Env       map[string]string `toml:"env"`     // available at build + runtime
	Secrets   map[string]string `toml:"secrets"` // runtime only (never baked into the image)
}

func Load

func Load(path string) (*Config, error)

func (*Config) Environment

func (c *Config) Environment(dir string) map[string]string

func (*Config) IsLocal

func (c *Config) IsLocal() bool

func (*Config) RemoteHost

func (c *Config) RemoteHost() string

func (*Config) TargetLabel

func (c *Config) TargetLabel() string

type DeployConfig

type DeployConfig struct {
	Release string `toml:"release"` // command run once (e.g. migrations) before a new version goes live
	Network string `toml:"network"` // docker network to join for team isolation; empty = shared "skiff"
}

DeployConfig holds deploy-lifecycle hooks.

type ResourcesConfig

type ResourcesConfig struct {
	Memory string `toml:"memory"` // e.g. "512m"
	CPU    string `toml:"cpu"`    // e.g. "0.5"
}

type ServerConfig

type ServerConfig struct {
	Host string `toml:"host"`
}

ServerConfig describes where the app runs. An empty host means local Docker.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL