Conversation
📝 WalkthroughWalkthroughCentralized Lychee service configuration via two YAML anchors (base and common env). Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docker-compose.yaml (1)
386-398:environmentoverride replaces base defaults—worker lacks fallback values.Redefining
environment:replaces the base map entirely, so the worker loses explicit defaults (PUID, PGID, DB_HOST, APP_KEY, etc.) that the API service has. While the worker inheritsenv_fileand will load variables from.env, if.envis incomplete or missing—common in fresh setups—the worker will lack critical fallbacks and may fail to start.Consider anchoring the base environment and merging it in the worker:
Suggested fix
environment: + &base-lychee-env PUID: "${PUID:-1000}" PGID: "${PGID:-1000}"lychee_worker: <<: *base-lychee-setup container_name: lychee-worker environment: + <<: *base-lychee-env LYCHEE_MODE: worker
Centralize all the configuration in a single chunk.
Re-use the configuration later in the file.
Key Design Notes
x-Extension Fieldsx-base-lychee-setupis a Compose extension fieldYAML Anchors (
&) and Merge Keys (<<)&base-lychee-setupdefines the template<<: *base-lychee-setupinjects it into each serviceEnvironment Variable Overrides
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.