Skip to content

Feat/env config#1866

Merged
osma merged 29 commits intoNatLibFi:mainfrom
jdfranel:feat/env-config
Jan 30, 2026
Merged

Feat/env config#1866
osma merged 29 commits intoNatLibFi:mainfrom
jdfranel:feat/env-config

Conversation

@jdfranel
Copy link

Reasons for creating this PR

Support base href and config path variables in the environment for better docker deployment (same as SKOSMOS_SPARQL_ENDPOINT) .

Link to relevant issue(s), if any

Description of the changes in this PR

  • I added env variables SKOSMOS_CONFIG_PATH and SKOSMOS_BASE_HREF.
  • Updated src/model/GlobalConfig.php so when no $config_name is provided it will fallback to the env variable or the original ../../config.ttl for retro-compatibility.
  • I removed the default $config_name in the constructor of src/model/Model.php which was a duplicate of GlobalConfig.php
  • Allowed for $config_name and SKOSMOS_CONFIG_PATH to be either absolute (starts with /) or relative. This made me update some tests to remove the starting / in the config_name. (i.e. /../../tests/testconfig.ttl turned into ../../tests/testconfig.ttl)
  • Updated tests/docker-compose.yml

Known problems or uncertainties in this PR

Some config that had defined the $config_name with a starting / might need to update the config_name.

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
  • The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@jdfranel jdfranel marked this pull request as draft January 2, 2026 08:27
@jdfranel jdfranel marked this pull request as ready for review January 3, 2026 15:11
@osma osma moved this to Under review in Skosmos 3.x Backlog Jan 20, 2026
@osma osma self-requested a review January 21, 2026 09:52
@osma osma self-assigned this Jan 22, 2026
Copy link
Member

@osma osma left a comment

Choose a reason for hiding this comment

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

This also looks like an excellent PR @jdfranel! Thank you!

One minor question in the comment below.

@osma osma added this to the 3.x milestone Jan 28, 2026
@sonarqubecloud
Copy link

@osma
Copy link
Member

osma commented Jan 30, 2026

Thanks again, very reasonable! Merging this now for the 3.1 release.

@osma osma merged commit 67004e8 into NatLibFi:main Jan 30, 2026
9 checks passed
@github-project-automation github-project-automation bot moved this from Under review to Issue/PR closed in Skosmos 3.x Backlog Jan 30, 2026
@osma osma modified the milestones: 3.x, 3.1 Jan 30, 2026
@jdfranel jdfranel deleted the feat/env-config branch February 10, 2026 08:21
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.

Improved docker configuration

2 participants