Skip to content

fix(build): add a Docker Compose example and a writable data dir - #32

Merged
gnacho merged 2 commits into
mainfrom
fix/docker-compose-example
Nov 12, 2026
Merged

gnacho merged 2 commits into
mainfrom
fix/docker-compose-example

Conversation

@gnacho

@gnacho gnacho commented Nov 12, 2026

Copy link
Copy Markdown
Owner

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/ocapps and runs as uid 10001 without creating or chowning the directory. A named volume inherits root:root 0755, and startup fails in ensureWritableDir with OCAPPS_DATA_DIR no escribible. The fix creates the directory and hands it to the service user before USER ocapps.

The docs get a Docker section for the official OpenCloud compose project: an overlay service on opencloud-net pointing at http://opencloud:9200, the extension unzipped into the ./config/opencloud/apps bind mount that the compose file already maps to the default WEB_ASSET_APPS_PATH, the apps.yaml entry, the two nginx locations and the healthz check. install.sh, opencloud-apps.service and ocapps-ext are 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 check docker run --rm ocapps ls -ld /var/lib/ocapps shows uid 10001.

Closes #31

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.
@gnacho
gnacho merged commit 1b2d1db into main Nov 12, 2026
3 checks passed
@gnacho
gnacho deleted the fix/docker-compose-example branch November 12, 2026 11:14
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.

deploy: add a Docker Compose example and fix the image data dir

1 participant