Skip to content

Per app tuning

ernolf edited this page Aug 3, 2026 · 1 revision

Per-app tuning

Most apps need none of this — the defaults are derived from the app itself. When an app does need to deviate, everything is set in one place.

🔧 Per-app overrides

.nextcloudignore removes files from within the shipped set (rsync exclude syntax, one pattern per line), for example test ballast inside shipped vendor packages:

/vendor/*/*/tests/

ncmake.mk in the app root overrides single variables in plain make syntax. It is included first, so anything set there wins:

keep_extra     = resources               # extra runtime paths to ship
php_build_cmd  = composer install --no-dev && php bin/generate.php
node_build_cmd =                         # empty = skip the npm build
php_image      = ghcr.io/nextcloud/continuous-integration-php8.2:latest   # build image
analysis_image = docker.io/library/composer:2.7   # pin the composer/psalm image

📋 Variables

Set on the command line (make build RUNTIME=bare), in the environment, or persistently in ncmake.mk.

Variable Default Purpose
RUNTIME auto (podman, else docker) container runtime: podman, docker, docker-rootless, bare
TARGET (required by make rsync/make cp) apps parent directory: local, user@host: (rsync) or <container>: (cp)
OCC (unset) OCC=1 wraps a deploy into occ app:disable → chown → occ app:enable
web_user www-data web server user of the target instance (file owner, runs occ)
ENGINE auto (docker, else podman) container CLI for make cp (independent of RUNTIME)
cert_dir ~/.nextcloud/certificates location of certificate, key and API token
php_image ghcr.io/nextcloud/continuous-integration-php<min> build image (min-version, fully tooled)
analysis_image docker.io/library/composer:2 image for composer and psalm (current PHP, fully tooled)
PHP max maxanalysis_image, minphp_image (build floor); make build forces min
node_image node:<engines.node major> Node container image
keep_extra (empty) additional paths for the shipped file set
php_build_cmd auto-detected PHP-side build command, empty skips
node_build_cmd auto-detected frontend build command, empty skips
NCMAKE $(NCMAKE_DIR)/Makefile-$(NCMAKE_REF) path to the core Makefile to include; point it at a local file to bypass the download and run an uncommitted change (development only, see CONTRIBUTING)
NCMAKE_REF main branch or tag the stub fetches
NCMAKE_DIR $XDG_CACHE_HOME/ncmake, else ~/.cache/ncmake cache location of the shared Makefile
NCMAKE_TTL_MIN 1440 minutes between upstream freshness checks

Clone this wiki locally