Skip to content

Add app management: disable bundled Nextcloud apps during provisioning#3

Merged
i2h3 merged 3 commits intomainfrom
copilot/manage-apps-disable-bundled
Mar 16, 2026
Merged

Add app management: disable bundled Nextcloud apps during provisioning#3
i2h3 merged 3 commits intomainfrom
copilot/manage-apps-disable-bundled

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

Adds the ability to disable Nextcloud apps post-deployment via the Docker Engine exec API, with automatic readiness polling before executing commands.

Configuration

NextcloudConfiguration gains a disabledApps parameter (defaults to [], backward compatible):

let container = try await NextcloudContainerManager.deploy(
    configuration: NextcloudConfiguration(
        tag: tag,
        disabledApps: [
            "bruteforcesettings",
            "firstrunwizard",
            "nextcloud_announcements",
            "password_policy",
        ]
    )
)

Provisioning pipeline

  • Readiness pollingwaitUntilReady() polls status.php every 2s until installed: true (120s timeout). Skipped entirely when disabledApps is empty.
  • App disabling — Each app runs as an independent php occ app:disable <app> exec via the Docker API (POST /containers/{id}/execPOST /exec/{id}/start detached → poll GET /exec/{id}/json). Individual failures are swallowed per requirements.
  • Exec polling has a 30s per-command timeout to prevent hangs.

New types

  • CreateExecRequest, CreateExecResponse, StartExecRequest, ExecInspectResponse — Docker exec API models
  • NextcloudStatusstatus.php response model

Other changes

  • DockerEngineClient — added get() method
  • DockerClientError — added timeout case
Original prompt

This section details on the original issue you should resolve

<issue_title>Managing Apps</issue_title>
<issue_description>As part of provisioning, some bundled apps which are enabled by default should be possible to disable. Examples for test environments:

  • Brute-force settings (bruteforcesettings)
  • First run wizard (firstrunwizard)
  • Nextcloud announcements (nextcloud_announcements)
  • Password policy (password_policy)

Technical Details

  • Nextcloud server apps can be disabled in the command line by using the ./occ app:disabled <app> command. This requires to SSH into the Docker container as www-data and run the Nextcloud server command line occ in the directory /var/www/html. Probably this is easier and cleaner by using the Docker Engine API to run commands inside a container.
  • The disabling of an app should not interrupt the whole provisioning. Every individual disabling must be run as a dedicated command which may fail without breaking the following ones.
  • It is necessary to wait for Nextcloud server to be fully operational after deployment first. This can be achieved by polling the status page until it indicates installed status.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI and others added 2 commits March 16, 2026 16:03
Co-authored-by: i2h3 <142165879+i2h3@users.noreply.github.com>
…imeout

Co-authored-by: i2h3 <142165879+i2h3@users.noreply.github.com>
Copilot AI changed the title [WIP] [APP-1] Enable disabling of bundled apps during provisioning Add app management: disable bundled Nextcloud apps during provisioning Mar 16, 2026
Copilot AI requested a review from i2h3 March 16, 2026 16:07
Copilot finished work on behalf of i2h3 March 16, 2026 16:07
@i2h3 i2h3 marked this pull request as ready for review March 16, 2026 16:13
@i2h3 i2h3 merged commit 3f53819 into main Mar 16, 2026
1 check passed
@i2h3 i2h3 deleted the copilot/manage-apps-disable-bundled branch March 16, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Managing Apps

2 participants