Skip to content

Add environment variable support to config.yaml - #342

Open
HarkuLi wants to merge 6 commits into
P0nk:masterfrom
HarkuLi:out/feat/env-in-yaml
Open

HarkuLi wants to merge 6 commits into
P0nk:masterfrom
HarkuLi:out/feat/env-in-yaml

Conversation

@HarkuLi

@HarkuLi HarkuLi commented Apr 11, 2026

Copy link
Copy Markdown

Description

  • Add environment variable support to config.yaml.
    • The variable format (${<var_name>:<default>}) follows the one in Spring framework.
  • Extract environment-dependent settings in config.yaml as environment variables.
  • Improve README.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested my changes
  • I have added unit tests that prove my changes work

HarkuLi added 6 commits April 11, 2026 21:36
1.  Extract the part of Docker as an independent section (Quick start).
2.  Getting started => Local setup. And make it focus on server part.
3.  Extract the part of "Client" and "Getting into the game" as independent sections.
@HarkuLi
HarkuLi force-pushed the out/feat/env-in-yaml branch from 8605ee0 to e1c1973 Compare April 11, 2026 13:39
@HarkuLi HarkuLi mentioned this pull request May 9, 2026
2 of 3 tasks
MinatoNami added a commit to MinatoNami/Cosmic-AI that referenced this pull request Sep 20, 2026
Resolved against P0nk#327, which solved the same problem in a narrower way.
Kept P0nk#342's mechanism - ${VAR:default} substitution over the whole of
config.yaml, with DB_URL_FORMAT replaced by DB_HOST/DB_PORT/DB_NAME - and
folded P0nk#327's contribution, .env file loading, into EnvironmentVariables so
the substitution also sees a local .env. A real environment variable beats
the file, so Docker and CI can still override it.

tools.EnvironmentConfig from P0nk#327 is dropped: with config.yaml doing the
substitution, DatabaseConnection no longer needs its own env lookups.

Co-Authored-By: Claude Opus 5 <[email protected]>
MinatoNami added a commit to MinatoNami/Cosmic-AI that referenced this pull request Sep 20, 2026
README conflicted with P0nk#342 and P0nk#344, which reorganised the same sections.
Kept all three: environment variables under Quick start, then Development,
then Deploying to Kubernetes.

Co-Authored-By: Claude Opus 5 <[email protected]>
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.

1 participant