Repository navigation
fix(build): add a Docker Compose example and a writable data dir - #32
Merged
Merged
Conversation
A named volume inherits the ownership of the image directory, so the process running as uid 10001 could not create /var/lib/ocapps and exited in ensureWritableDir.
Covers the OpenCloud compose project: service overlay on opencloud-net, extension unzip into the apps bind mount, apps.yaml entry, nginx routes and the healthz check. Skips install.sh and ocapps-ext, which are systemd only.
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.
Docker is a supported deployment in the README, but only the systemd path was documented, and the image had a defect that the documentation would have exposed further.
The image declares
VOLUME /var/lib/ocappsand runs as uid 10001 without creating or chowning the directory. A named volume inheritsroot:root 0755, and startup fails inensureWritableDirwithOCAPPS_DATA_DIR no escribible. The fix creates the directory and hands it to the service user beforeUSER ocapps.The docs get a Docker section for the official OpenCloud compose project: an overlay service on
opencloud-netpointing athttp://opencloud:9200, the extension unzipped into the./config/opencloud/appsbind mount that the compose file already maps to the defaultWEB_ASSET_APPS_PATH, theapps.yamlentry, the two nginx locations and thehealthzcheck.install.sh,opencloud-apps.serviceandocapps-extare systemd only and are called out as not applicable.Verification done here: compose example parses as YAML, links and anchors checked, no Go code touched. Not executed: this machine has neither docker nor podman, so the image fix is verified by reading the Dockerfile, not by starting a container. Reviewing the ownership line is enough, or run
docker build -t ocapps .and checkdocker run --rm ocapps ls -ld /var/lib/ocappsshows uid 10001.Closes #31