Documentation
¶
Index ¶
- func CheckPrerequisites(ctx context.Context) error
- func ChooseBoardURL(instanceName, detectedURL string, detectedErr error) (string, bool)
- func Existing(ctx context.Context, opts *Options) error
- func InstallInvocation(user, email, title, siteURL, password string) ([]string, map[string]string)
- func InstanceTitle(title, instanceName string) string
- func PrintSkippedStep(current, total int, label, reason string)
- func PrintStartHint(dir string)
- func PrintUsefulCommands()
- func RunComposerInstall(ctx context.Context, runner *environment.Runner, root string, verbose bool) error
- func RunJavaScript(ctx context.Context, opts *Options, step, totalSteps int) error
- func ShouldRunComposer(targetPath string) bool
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPrerequisites ¶
CheckPrerequisites verifies Docker is running and Docker Compose is available, reporting actionable hints when Docker cannot be used.
func ChooseBoardURL ¶
ChooseBoardURL uses a nonempty detected URL when detection succeeded; otherwise it returns the instance's fallback URL and false.
func Existing ¶
Existing configures Docker for an existing XenForo installation and optionally starts containers and installs dependencies or XenForo. It updates opts with the selected instance name and site title.
func InstallInvocation ¶
InstallInvocation returns shell arguments and environment for xf:install. Installer values are shell-quoted, and the password is supplied through XF_INSTALL_PASSWORD rather than host argv. It still appears in PHP argv inside the container.
func InstanceTitle ¶
InstanceTitle formats a site title with its instance name. An empty title defaults to "XenForo".
func PrintSkippedStep ¶
PrintSkippedStep displays a numbered step and the reason it was skipped.
func PrintStartHint ¶
func PrintStartHint(dir string)
PrintStartHint tells the user how to start the environment in dir.
func PrintUsefulCommands ¶
func PrintUsefulCommands()
PrintUsefulCommands displays common environment management commands.
func RunComposerInstall ¶
func RunComposerInstall(ctx context.Context, runner *environment.Runner, root string, verbose bool) error
RunComposerInstall installs Composer dependencies inside the container: the root project's, then those of any add-on that still lacks them.
A failing add-on is reported but not fatal. Its dependencies only matter once the add-on is installed, and an add-on's manifest can stop resolving on its own, such as when Composer starts blocking a pinned version with a security advisory. Failing here would make every new environment unusable.
func RunJavaScript ¶
RunJavaScript builds only JavaScript, never release tasks or configured commands. Add-on failures warn and continue; core failures and cancellation stop setup. Both init modes call this before any container startup.
func ShouldRunComposer ¶
ShouldRunComposer reports whether a directory is a Composer project.
Repository checkouts track composer.json, so a fresh worktree has one and its dependencies must be installed. Release packages ship vendor/ prebuilt and have no manifest, so they are skipped automatically.
Types ¶
type Options ¶
type Options struct {
TargetPath string
InstanceName string
SiteTitle string
AdminUser string
AdminPassword string
AdminEmail string
Contexts []string
EnvResolved map[string]string
StartContainers bool
SkipComposer bool
SkipBuildJS bool
SkipInstall bool
}
Options controls setup of an existing installation, including container startup, optional build and install steps, and resolved environment overrides.