feat(nextcloud): standalone Docker stack + split provisioner pattern (misp-style)#192
Open
t0kubetsu wants to merge 2 commits into
Open
feat(nextcloud): standalone Docker stack + split provisioner pattern (misp-style)#192t0kubetsu wants to merge 2 commits into
t0kubetsu wants to merge 2 commits into
Conversation
…ttern Drop the two-stage Dockerfile (php:8.3 builder + nextcloud runtime) and static users.yml in favour of the misp-standalone provisioner pattern: - Alpine single-stage image (bash/curl/jq/openssl); scripts volume-mounted at runtime rather than baked in - provision.sh: thin orchestrator (provision-users → provision-tokens) - provision-users.sh: OCS API user creation driven by NC_TEAMS / NC_INSTRUCTOR_COUNT env vars; auto-generated passwords; writes /tokens/nc-credentials.json + idempotency stamp - provision-tokens.sh: reads nc-credentials.json; generates an app password per user via /ocs/v2.php/core/apppassword; writes tokens.txt - .env.example: adds NC_TEAMS, NC_INSTRUCTOR_ORG, NC_INSTRUCTOR_COUNT, NC_USERS_PER_TEAM, NC_USER_DOMAIN - compose.yml: provisioner now uses env_file + three :ro script mounts - Makefile: adds keys target (nc-credentials.json) - README: documents new env-driven user model Closes #146
5 tasks
Contributor
Author
|
Deployment prerequisite — Before running the scenario, the stack directory on the deployer's catalog copy must have a Workaround (until resolved at the catalog level): cd /path/to/range42-catalog/03_container_layer/docker/admin/nextcloud
cp .env.example .envAll defaults in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
users.ymlwith the misp-standalone provisioner pattern: Alpine single-stage image; bash/curl/jq/openssl toolchain; provisioning scripts volume-mounted at runtime (not baked in)provision.sh(orchestrator) →provision-users.sh(OCS API user creation) →provision-tokens.sh(app-password generation)NC_TEAMS,NC_INSTRUCTOR_COUNT,NC_USERS_PER_TEAM) — no YAML file to maintain/tokens/nc-credentials.json; idempotency stamp at/tokens/.provisionedprevents re-run on restartmake keystarget added to surface the full credentials JSON alongside the existingmake tokensCloses #146
Scope:
03_container_layer/docker/admin/nextcloud/only.Changed files
Dockerfilecompose.ymlenv_file+ three:roscript mounts.env.exampleNC_TEAMS,NC_INSTRUCTOR_ORG,NC_INSTRUCTOR_COUNT,NC_USERS_PER_TEAM,NC_USER_DOMAINMakefilekeystargetREADME.mdprovisioning/provision.shprovisioning/provision-users.shprovisioning/provision-tokens.shprovisioning/init.shprovisioning/users.ymlTest plan
make build-upbuilds provisioner image without errorsmake logs-provisionershows users created + tokens writtenmake tokensprintsusername:apppasswordlinesmake keysprintsnc-credentials.jsonwith all usersmake reprovisiontriggers a fresh provisioning run