Repository navigation
[3.0] Reads .env in the dev scripts, as docker compose does - #9723
Merged
live627 merged 1 commit intoOct 2, 2026
Merged
Conversation
compose.yaml takes its ports and credentials from .env, and lib.sh says SMF_RUNNER can be set there too, but the scripts never read the file. A stack moved to other ports was installed with a board URL on the default one, so every link on the forum led to a different stack, and SMF_RUNNER in .env did nothing. lib.sh now reads .env as KEY=VALUE lines, without running it, and leaves alone anything already in the environment, which is what docker compose does too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
compose.yamltakes its host ports, credentials andSMF_DB_TYPEfrom.env, and.dev/lib.shsaysSMF_RUNNERcan be set there too ("Pass --docker, or set this in .env, for the stack")..dev/README.mdsays the same ("If you work in the Docker stack, put this in.envonce"). But nothing in.dev/ever reads the file. The scripts use their own defaults unless the same variables are exported in the shell.The case that bites is running a second stack beside the first, which
.docker/env.exampleinvites. WithWEB_PORT=8480in.env, the stack serves on 8480, butinstall-forum.shstill writes$boardurl = 'http://localhost:8080', so every link and stylesheet on the new forum points at the other stack.SMF_RUNNER=dockerin.envhas no effect either.lib.shnow reads.envwhen there is one, asKEY=VALUElines rather than sourcing it. Comments, blank lines and invalid keys are skipped, surrounding quotes are dropped, and Windows line endings are tolerated. As with docker compose, anything already set in the environment wins, soWEB_PORT=9999 .dev/test.shstill means 9999.Testing
There is no test harness for the shell scripts, so this was checked by hand:
WEB_PORT=8480in.env, sourcinglib.shgivesWEB_PORT=8480andSMF_BOARDURL=http://localhost:8480(before: 8080);WEB_PORT=9999still wins;.envwith a quoted value, a CRLF line, a value containing=, an invalid key, a comment and no final newline reads as expected, and no helper variables are left behind;.dev/test.sh --engine mysql --testsuite http --filter GuestPagesTestpasses through the changed script.Issues References (Fixes|Related|Closes)
None filed; found setting up a second stack for #9712.
🤖 Generated with Claude Code