Skip to content

Add env var support for static-dir and i18n-dir flags#2807

Merged
knadh merged 2 commits intoknadh:masterfrom
alanef:master
Dec 12, 2025
Merged

Add env var support for static-dir and i18n-dir flags#2807
knadh merged 2 commits intoknadh:masterfrom
alanef:master

Conversation

@alanef
Copy link
Contributor

@alanef alanef commented Dec 9, 2025

Summary

  • Adds support for LISTMONK_static_dir and LISTMONK_i18n_dir environment variables
  • Allows configuring custom static/i18n directories without modifying the command line
  • Useful for Docker deployments where you can't easily modify the command

Changes

  • Modified env var parsing to convert single underscores to hyphens for top-level keys (CLI flags like static-dir)
  • Nested config keys (containing dots) keep underscores (e.g., db.ssl_mode)

Examples

# These now work:
LISTMONK_static_dir=/custom/static
LISTMONK_i18n_dir=/custom/i18n

# Existing env vars still work:
LISTMONK_db__ssl_mode=disable

Test plan

  • Tested locally with docker-compose
  • Verified LISTMONK_db__ssl_mode still works (nested config)
  • Verified LISTMONK_static_dir works (top-level CLI flag)

alanef and others added 2 commits December 9, 2025 10:01
LISTMONK_static_dir and LISTMONK_i18n_dir now work as environment
variables, allowing custom static file paths without modifying
the command line in docker-compose.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…keys.

Nested config keys like db.ssl_mode keep underscores.
Top-level CLI flags like static-dir get underscore->hyphen conversion.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@knadh knadh merged commit e703c37 into knadh:master Dec 12, 2025
1 check passed
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.

2 participants