Skip to content

Commit

Permalink
Merge pull request #650 from mittwald/feat/add-humhub
Browse files Browse the repository at this point in the history
Add command to install HumHub
  • Loading branch information
martin-helmich authored Aug 26, 2024
2 parents 102a245 + 7ef9ce2 commit 38b44c0
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 0 deletions.
94 changes: 94 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ USAGE
* [`mw app install contao`](#mw-app-install-contao)
* [`mw app install drupal`](#mw-app-install-drupal)
* [`mw app install grav`](#mw-app-install-grav)
* [`mw app install humhub`](#mw-app-install-humhub)
* [`mw app install joomla`](#mw-app-install-joomla)
* [`mw app install matomo`](#mw-app-install-matomo)
* [`mw app install moodle`](#mw-app-install-moodle)
Expand Down Expand Up @@ -911,6 +912,99 @@ FLAG DESCRIPTIONS
If unspecified, the Grav will be installed in the latest available version.
```

## `mw app install humhub`

Creates new HumHub installation.

```
USAGE
$ mw app install humhub --version <value> [-p <value>] [-q] [--host <value>] [--admin-user <value>] [--admin-email
<value>] [--admin-pass <value>] [--admin-firstname <value>] [--admin-lastname <value>] [--site-title <value>] [-w]
[--wait-timeout <value>]
FLAGS
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the
context
-q, --quiet suppress process output and only display a machine-readable summary.
-w, --wait wait for the resource to be ready.
--admin-email=<value> email address of your administrator user.
--admin-firstname=<value> first name of your administrator user.
--admin-lastname=<value> Lastname of your administrator user.
--admin-pass=<value> password of your administrator user.
--admin-user=<value> Username for your administrator user.
--host=<value> host to initially configure your HumHub installation with; needs to be created
separately.
--site-title=<value> site title for your HumHub installation.
--version=<value> (required) [default: latest] version of HumHub to be installed.
--wait-timeout=<value> [default: 600s] the duration to wait for the resource to be ready (common units like
'ms', 's', 'm' are accepted).
DESCRIPTION
Creates new HumHub installation.
FLAG DESCRIPTIONS
-p, --project-id=<value>
ID or short ID of a project; this flag is optional if a default project is set in the context
May contain a short ID or a full ID of a project; you can also use the "mw context set --project-id=<VALUE>" command
to persistently set a default project for all commands that accept this flag.
-q, --quiet suppress process output and only display a machine-readable summary.
This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in
scripts), you can use this flag to easily get the IDs of created resources for further processing.
--admin-email=<value> email address of your administrator user.
email address that will be used for the first administrator user that is created during the HumHub installation.
If unspecified, email address of your mStudio account will be used. This email address can be changed after the
installation is finished.
--admin-firstname=<value> first name of your administrator user.
The first name that will be used for the first administrator user that is created during the HumHub installation.
If unspecified, the first name of your mStudio user will be used. This value can be changed after the installation
is finished.
--admin-lastname=<value> Lastname of your administrator user.
The last name that will be used for the first administrator user that is created during the HumHub installation.
If unspecified, the last name of your mStudio user will be used. This value can be changed after the installation is
finished.
--admin-pass=<value> password of your administrator user.
The password that will be used for the first administrator user that is created during the HumHub installation.
If unspecified, a random secure password will be generated and printed to stdout. This password can be changed after
the installation is finished
--admin-user=<value> Username for your administrator user.
Username of the first administrator user which will be created during the HumHub installation.
If unspecified, an adequate username will be generated.
After the installation is finished, the username can be changed and additional administrator users can be created.
--host=<value> host to initially configure your HumHub installation with; needs to be created separately.
Specify a host which will be used during the installation and as an initial host for the HumHub configuration.
If unspecified, the default host for the given project will be used.
This does not change the target of the used host and can be changed later by configuring the host and your HumHub
installation.
--site-title=<value> site title for your HumHub installation.
The site title for this HumHub installation. It is also the title shown in the app overview in the mStudio and the
CLI.
If unspecified, the application name and the given project ID will be used. The title can be changed after the
installation is finished
--version=<value> version of HumHub to be installed.
Specify the version in which your HumHub will be installed.
If unspecified, the HumHub will be installed in the latest available version.
```

## `mw app install joomla`

Creates new Joomla! installation.
Expand Down
42 changes: 42 additions & 0 deletions src/commands/app/install/humhub.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { ExecRenderBaseCommand } from "../../../lib/basecommands/ExecRenderBaseCommand.js";
import React from "react";
import {
AppInstallationResult,
AppInstaller,
} from "../../../lib/resources/app/Installer.js";

export const humhubInstaller = new AppInstaller(
"e71c238f-f780-4bd4-9492-56f015294db6",
"HumHub",
[
"version",
"host",
"admin-user",
"admin-email",
"admin-pass",
"admin-firstname",
"admin-lastname",
"site-title",
] as const,
);

export default class InstallHumhub extends ExecRenderBaseCommand<
typeof InstallHumhub,
AppInstallationResult
> {
static description = humhubInstaller.description;
static flags = humhubInstaller.flags;

protected async exec(): Promise<{ appInstallationId: string }> {
return humhubInstaller.exec(
this.apiClient,
this.args,
this.flags,
this.config,
);
}

protected render(result: AppInstallationResult): React.ReactNode {
return humhubInstaller.render(result, this.flags);
}
}

0 comments on commit 38b44c0

Please sign in to comment.