Skip to content

Conversation

@Tpuljak
Copy link
Member

@Tpuljak Tpuljak commented Nov 24, 2025

This pull request introduces support for configuring the API service using an external YAML or JSON config map file, in addition to environment variables. It adds an example configuration file, implements a loader utility for reading and merging config values, and updates documentation to describe the new configuration method.

Config map support for API service:

  • Added an example config map file (config-map.example.yaml) that demonstrates all supported configuration options, including database, Redis, SMTP, S3, runner, logging, and quota settings.
  • Implemented a new utility (config-map.loader.ts) to load configuration from a YAML or JSON file, retrieve nested values using dot notation, and resolve config values with environment variable precedence.

Documentation updates:

  • Updated the OSS deployment documentation to describe the new config map feature, how to enable it with CONFIG_MAP_PATH, and clarified that environment variables override config file values.

@Tpuljak Tpuljak requested review from Copilot and gdraganic November 24, 2025 15:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request introduces support for configuring the API service via external YAML or JSON configuration files, complementing the existing environment variable approach. The implementation prioritizes environment variables over config file values, allowing flexible deployment configurations.

Key changes:

  • Added a config map loader utility that parses YAML/JSON files and retrieves nested values using dot notation
  • Refactored the configuration module to use helper functions that check environment variables first, then fall back to config map values
  • Updated documentation to describe the new CONFIG_MAP_PATH feature and configuration precedence rules

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
apps/api/config-map.example.yaml Example configuration demonstrating YAML structure for database, Redis, SMTP, S3, runner, logging, and quota settings
apps/api/src/config/config-map.loader.ts New utility module implementing config file loading, nested value retrieval, and environment variable precedence logic
apps/api/src/config/configuration.ts Refactored to use config map helper functions for all configuration values while maintaining environment variable precedence
apps/docs/src/content/docs/en/oss-deployment.mdx Added documentation explaining CONFIG_MAP_PATH usage and configuration precedence behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Tpuljak Tpuljak requested a review from brunogrbavac November 25, 2025 10:24
brunogrbavac
brunogrbavac previously approved these changes Nov 27, 2025
Tpuljak and others added 3 commits December 3, 2025 11:59
@Tpuljak Tpuljak force-pushed the config-map-support branch from 2bd3c25 to 99b7378 Compare December 3, 2025 13:14
Copilot AI review requested due to automatic review settings December 3, 2025 13:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings December 3, 2025 13:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants