Skip to content

Adopt OpenCloud config convention and generate config docs - #1

Merged
dragotin merged 5 commits into
dragotin:mainfrom
dschmidt:feat/config-opencloud-convention
Aug 25, 2026
Merged

Adopt OpenCloud config convention and generate config docs#1
dragotin merged 5 commits into
dragotin:mainfrom
dschmidt:feat/config-opencloud-convention

Conversation

@dschmidt

@dschmidt dschmidt commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Aligns config with the OpenCloud convention and generates config docs, like opencloud-music.

Config: internal/configpkg/config (config/defaults/parser) with yaml/env/desc tags. Env vars grouped IMMICHFRAME_OPENCLOUD_* / IMMICHFRAME_* (breaking: was OPENCLOUD_* / FRAME_*); OC_URL/OC_INSECURE as shared aliases. yaml + env loading via opencloud's own pkg/config.BindSourcesToStructs + envdecode, so it depends on regular opencloud (v7.4.0). That currently pulls in opencloud's service configs; opencloud-eu/opencloud#3270 extracts the binder into a leaf package to drop those again.

Docs: a GitHub Pages workflow generates the env-var table + example config from the struct tags (one source instead of three). make docs builds it locally; enable Pages → Source: GitHub Actions to publish.

Move config from internal/config to pkg/config and split it into
config/defaults/parser, matching the OpenCloud service layout. yaml is
loaded via github.com/dschmidt/libre-graph-adapter-kit (gookit, avoids the
opencloud/pkg/config service-config tree); env vars via
opencloud/pkg/config/envdecode.

Env vars follow the OC_*/IMMICHFRAME_* convention (was OPENCLOUD_*/FRAME_*).
Update main.go, frame, Dockerfile, .env.example, docker-compose (env_file),
README and launch.json accordingly.
Generate a service reference site (env-var table, example config) from the
tagged config structs via dschmidt/opencloud-service-docs-action, and deploy
it to GitHub Pages. `make docs` reproduces the CI build locally.
@dschmidt
dschmidt marked this pull request as draft August 8, 2026 00:21
Move the OpenCloud connection env vars under IMMICHFRAME_OPENCLOUD_* (space,
credentials, insecure) so all backend-connection settings share one prefix,
matching music's MUSIC_OPENCLOUD_*. OC_URL/OC_INSECURE stay as shared aliases.

Rename the Frame config struct and its yaml section to ImmichFrame
(yaml key `immichframe`), since these are the service's own settings.
Load the yaml config file via opencloud/pkg/config.BindSourcesToStructs (env
vars still via opencloud/pkg/config/envdecode), so immichframe depends only on
regular released opencloud (pinned to the v7.4.0 commit) and not on the adapter
kit. This pulls in opencloud's service configs; opencloud-eu/opencloud#3270
extracts BindSourcesToStructs into a leaf package to drop those again.
Comment thread go.mod
google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260729162451-8efbd57d26e0 // indirect
google.golang.org/grpc v1.83.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This list would become muuuuch shorter with opencloud-eu/opencloud#3270 merged

@dschmidt
dschmidt marked this pull request as ready for review August 8, 2026 00:45
@dschmidt
dschmidt marked this pull request as draft August 8, 2026 01:02
@dschmidt
dschmidt force-pushed the feat/config-opencloud-convention branch from 6069c43 to 9275c78 Compare August 8, 2026 01:07
@dschmidt
dschmidt marked this pull request as ready for review August 8, 2026 01:09
Move opencloud-service.yml to the repo root, add a docs/intro.md overview
overlay, and point the workflow and dev/build-docs.sh at the action's new
.cache/service-docs layout (action @8956447).
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.

2 participants