Skip to content

feat: Add useImageCode flag to support custom image-based deployments#847

Open
rizlas wants to merge 2 commits intonextcloud:mainfrom
ConsortiumGARR:imagecode
Open

feat: Add useImageCode flag to support custom image-based deployments#847
rizlas wants to merge 2 commits intonextcloud:mainfrom
ConsortiumGARR:imagecode

Conversation

@rizlas
Copy link
Copy Markdown

@rizlas rizlas commented Apr 9, 2026

Description of the change

Add nextcloud.persistence.useImageCode flag to skip the /var/www and /var/www/html volume mounts when the application code is baked directly into the container image.

Benefits

This enables custom image-based deployments where application code is shipped as part of the image rather than live-synced via rsync. It allows greater flexibility and supports efficient upgrades and horizontal scaling in Kubernetes environments, avoiding the default volume mounts that would otherwise shadow the image content.

As an enterprise user I found the official enterprise Helm chart unsatisfying as it only targets the AIO deployment model. Both the enterprise and community images share the same rsync-based approach for live code delivery, which makes efficient upgrades and horizontal scaling impractical in Kubernetes environments. Despite paying for an enterprise subscription, I received no direct support and found the enterprise offering to add little value over the community counterpart. In fact, this community Helm chart is superior in every regard, especially for users who need a non-AIO deployment and customisation options.

A similar proposal for supporting immutable code images was already submitted in #496, confirming this is a recurring need in the community.

Possible drawbacks

Users enabling this flag must ensure their custom image exposes all required paths correctly, as no volume mounts will be applied to /var/www and /var/www/html.

Additional information

I reworked the community Apache-based Docker image by removing the rsync layer and adding support for enterprise code. The custom image is available at https://github.com/ConsortiumGARR/nextcloud-docker. I am currently testing this approach and plan to open a separate PR for the Docker image as well, hoping the changes will be accepted upstream.

Checklist

rizlas added 2 commits April 9, 2026 12:09
… mounts

Signed-off-by: rizlas <rizlas@users.noreply.github.com>
Signed-off-by: rizlas <rizlas@users.noreply.github.com>
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.

1 participant