Documentation
¶
Index ¶
- func ApplyExtraPorts(content string, extraPorts []string) string
- func BuildFPMImage(version string) error
- func BuildFPMImageTo(version string, w io.Writer) error
- func BundledExtensions() []string
- func ContainerExists(name string) (bool, error)
- func ContainerRunning(name string) (bool, error)
- func ContainerfileHash() (string, error)
- func DaemonReload() error
- func EnsureNetwork(name string) error
- func EnsureNetworkDNS(name string, servers []string) error
- func EnsureUserIni(version string) error
- func GenerateCustomQuadlet(svc *config.CustomService) string
- func GetQuadletTemplate(name string) (string, error)
- func ImageExists(image string) bool
- func NeedsFPMRebuild() bool
- func NetworkGateway(name string) string
- func PullImageTo(image string, w io.Writer) error
- func QuadletInstalled(name string) bool
- func RebuildFPMImage(version string) error
- func RebuildFPMImageTo(version string, w io.Writer) error
- func RemoveQuadlet(name string) error
- func RestartUnit(name string) error
- func Run(args ...string) (string, error)
- func RunSilent(args ...string) error
- func ServiceImage(quadletName string) string
- func StartUnit(name string) error
- func StopUnit(name string) error
- func StoreFPMHash() error
- func UnitStatus(name string) (string, error)
- func WriteFPMQuadlet(version string) error
- func WriteQuadlet(name, content string) error
- func WriteXdebugIni(version string, enabled bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyExtraPorts ¶ added in v1.0.0
ApplyExtraPorts appends extra PublishPort lines to quadlet content.
func BuildFPMImage ¶ added in v0.1.14
BuildFPMImage builds the lerd PHP-FPM image for the given version if it doesn't exist.
func BuildFPMImageTo ¶ added in v0.5.6
BuildFPMImageTo builds the PHP-FPM image writing output to w.
func BundledExtensions ¶ added in v0.5.5
func BundledExtensions() []string
BundledExtensions returns the set of PHP extensions included in the default lerd FPM image.
func ContainerExists ¶
ContainerExists returns true if the named container exists (running or not).
func ContainerRunning ¶
ContainerRunning returns true if the named container is running.
func ContainerfileHash ¶ added in v0.1.25
ContainerfileHash returns the SHA-256 hash of the embedded PHP-FPM Containerfile. This is used to detect when images need to be rebuilt after a lerd update.
func EnsureNetwork ¶
EnsureNetwork creates the named Podman network if it does not already exist.
func EnsureNetworkDNS ¶ added in v1.0.3
EnsureNetworkDNS syncs the DNS servers on the named network to the provided list. It drops servers no longer present and adds new ones. This sets the upstream forwarders that aardvark-dns uses, which is necessary on systems where /etc/resolv.conf points to a stub resolver (e.g. 127.0.0.53) that is not reachable from inside the container network namespace.
func EnsureUserIni ¶ added in v0.5.5
EnsureUserIni creates the per-version user php.ini with defaults if it doesn't exist.
func GenerateCustomQuadlet ¶ added in v0.5.4
func GenerateCustomQuadlet(svc *config.CustomService) string
GenerateCustomQuadlet builds a quadlet .container file for a custom service.
func GetQuadletTemplate ¶
GetQuadletTemplate returns the content of a named quadlet template file.
func ImageExists ¶ added in v0.5.6
ImageExists returns true if the named image is present in the local store.
func NeedsFPMRebuild ¶ added in v0.1.25
func NeedsFPMRebuild() bool
NeedsFPMRebuild returns true if the stored Containerfile hash differs from the current embedded Containerfile, meaning images should be rebuilt.
func NetworkGateway ¶ added in v0.1.14
NetworkGateway returns the gateway IP of the named Podman network. Falls back to "127.0.0.1" if it cannot be determined.
func PullImageTo ¶ added in v0.5.6
PullImageTo pulls the named image, writing progress output to w.
func QuadletInstalled ¶ added in v0.1.17
QuadletInstalled returns true if a quadlet .container file exists for the given unit name.
func RebuildFPMImage ¶ added in v0.1.17
RebuildFPMImage force-removes and rebuilds the PHP-FPM image for the given version.
func RebuildFPMImageTo ¶ added in v0.5.6
RebuildFPMImageTo force-rebuilds the PHP-FPM image writing output to w.
func RemoveQuadlet ¶
RemoveQuadlet removes a Podman quadlet container unit file.
func ServiceImage ¶ added in v0.5.6
ServiceImage returns the OCI image name embedded in a named quadlet template. Returns "" if the quadlet or Image line is not found.
func StoreFPMHash ¶ added in v0.1.25
func StoreFPMHash() error
StoreFPMHash writes the current Containerfile hash to disk.
func UnitStatus ¶
UnitStatus returns the active state of a systemd user unit.
func WriteFPMQuadlet ¶ added in v0.4.0
WriteFPMQuadlet writes the systemd quadlet for a PHP-FPM version and reloads the systemd daemon if the content changed. It also ensures the xdebug and user ini files exist.
func WriteQuadlet ¶
WriteQuadlet writes a Podman quadlet container unit file.
func WriteXdebugIni ¶ added in v0.4.0
WriteXdebugIni writes the per-version xdebug ini to the host config dir. The file is volume-mounted into the FPM container at /usr/local/etc/php/conf.d/99-xdebug.ini.
Types ¶
This section is empty.