Documentation
¶
Overview ¶
Package deploy implements deployment orchestration, handlers, and integration logic for managing application deployments in the daemon. It coordinates deployment workflows, lifecycle management, and high-level operations, utilizing core types from pkg/core/deploy. Concrete deployment execution and internal details are encapsulated within this package.
Build pipeline (build nodes only):
BuildImage(name, srcDir, cfg) builds a Docker image from a cloned source directory, pushes it to cfg.RegistryURL, removes the local copy to reclaim disk, and returns the fully-qualified image reference. The image tag is a millisecond Unix timestamp for natural sort order and uniqueness. Requires REGISTRY_URL in config.toml. Set REGISTRY_AUTH to a base64-encoded JSON credential string ({"username":"…","password":"…"}) for authenticated registries such as DigitalOcean Container Registry.
imageRef(registryURL, name) constructs the image reference used as the tag for both docker build and docker push.
Index ¶
- Constants
- func BuildImage(name, srcDir string, cfg *shared.Config) (string, error)
- func CloneRepo(remote store.RemoteObj, destDir, workDir string, config *shared.Config) error
- func DeployApp(bp store.Blueprint, name, logPath string, cfg *shared.Config) error
- func PullImage(imageRef string, workDir string, config *shared.Config) error
- func SetupDir(name string) (string, error)
- type Deployer
- func (d *Deployer) Build(ctx context.Context, req *deploy.BuildRequest) (*deploy.BuildResponse, error)
- func (d *Deployer) Deploy(ctx context.Context, req *deploy.DeployRequest) (*deploy.DeployResponse, error)
- func (d *Deployer) GetDeployment(ctx context.Context, id string) (*store.Deployment, error)
- func (d *Deployer) ListDeployments(ctx context.Context, userID string, limit, offset int) ([]*store.Deployment, error)
- func (d *Deployer) Publish(ctx context.Context, req *deploy.PublishRequest) (*deploy.DeployResponse, error)
- func (d *Deployer) UpdateDeploymentStatus(ctx context.Context, id string, status store.Status) error
- type Dispatcher
Constants ¶
const DockerIgnoreContent = `` /* 1163-byte string literal not displayed */
DockerIgnoreContent defines patterns to exclude from Docker builds
Variables ¶
This section is empty.
Functions ¶
func BuildImage ¶ added in v0.6.21
Types ¶
type Deployer ¶
type Deployer struct {
// contains filtered or unexported fields
}
func Init ¶
func Init(c *shared.Config, l *shared.Logger, s store.DeploymentStore, j Dispatcher) *Deployer
Init creates a new Deployer instance
func (*Deployer) Build ¶ added in v0.6.21
func (d *Deployer) Build(ctx context.Context, req *deploy.BuildRequest) (*deploy.BuildResponse, error)
func (*Deployer) Deploy ¶
func (d *Deployer) Deploy(ctx context.Context, req *deploy.DeployRequest) (*deploy.DeployResponse, error)
func (*Deployer) GetDeployment ¶
func (*Deployer) ListDeployments ¶
func (*Deployer) Publish ¶ added in v0.6.21
func (d *Deployer) Publish(ctx context.Context, req *deploy.PublishRequest) (*deploy.DeployResponse, error)
type Dispatcher ¶
type Dispatcher interface {
Submit(id string)
}