Issue
IMHO, the docker-compose-openai.yaml (introduced in #32) is not easy to comprehend at one go. It repeats the same environment and build configurations across 12 services. This impacts readability, maintainability and updates (error-prone) to a high margin for lab maintainers & students.
Proposed Change
It can be refactored using Compose Fragments (YAML anchors and aliases) to centralize shared configuration into a single template, ensuring consistency across all lab instances. This should reduce the file size by ~70%.
Example:
x-chat-base: &chat-base
build: ...
environment: ...
services:
chat-copilot-1:
<<: *chat-base
ports: ["127.0.0.1:4001:4000"]
volumes: [...]
I'd be happy to file a PR to improve the maintainability of these labs.
Unlike docker-compose.yaml, I'm hoping this variant isn't py generated 🤞, unless the change needs to take place in the generator.
Issue
IMHO, the docker-compose-openai.yaml (introduced in #32) is not easy to comprehend at one go. It repeats the same environment and build configurations across 12 services. This impacts readability, maintainability and updates (error-prone) to a high margin for lab maintainers & students.
Proposed Change
It can be refactored using Compose Fragments (YAML anchors and aliases) to centralize shared configuration into a single template, ensuring consistency across all lab instances. This should reduce the file size by ~70%.
Example:
I'd be happy to file a PR to improve the maintainability of these labs.