Skip to content

config --environment - #11891

Merged
ndeloof merged 1 commit into
docker:mainfrom
ndeloof:config_environment
Jun 11, 2024
Merged

ndeloof merged 1 commit into
docker:mainfrom
ndeloof:config_environment

Conversation

@ndeloof

@ndeloof ndeloof commented Jun 7, 2024

Copy link
Copy Markdown
Contributor

What I did
introduce docker compose config --environment to output the resolved environment variables used for interpolation

Related issue
closes #11873

(not mandatory) A picture of a cute animal, if possible in relation to what you did
image

@ndeloof
ndeloof marked this pull request as ready for review June 7, 2024 12:46
@ndeloof
ndeloof requested review from a team, glours and jhrotko and removed request for a team June 7, 2024 12:46
@glours

glours commented Jun 7, 2024

Copy link
Copy Markdown
Contributor

@ndeloof you need to update the doc 😉

Signed-off-by: Nicolas De Loof <[email protected]>
@ndeloof
ndeloof force-pushed the config_environment branch from 2b4a101 to d5f559c Compare June 7, 2024 13:46
@ndeloof
ndeloof merged commit d633c33 into docker:main Jun 11, 2024
Randalix pushed a commit to Randalix/Codeman that referenced this pull request Nov 6, 2026
A new Docker install was: clone (undocumented), copy .env.example by hand,
fix an Unraid data path and a Perth time zone, replace `changeme`, run the
start script, and then guess when the server was up. Start-Codeman.sh now
does all of it from a fresh clone:

- Preflight names the fix for a missing docker CLI, a missing or too-old
  Compose plugin (config --environment needs 2.27.2, docker/compose#11891),
  and an unreachable daemon (docker group, never sudo).
- With no docker/.env, it asks three questions (data folder, port,
  password; Enter takes each default: ~/codeman-docker, 3000 or the next
  free port, a generated password) and writes docker/.env FROM the example,
  so every key the updater's diffRequiredEnvKeys expects is present. Mode
  0600, host time zone, values Compose would interpolate single-quoted.
  Refuses $HOME, ~/.codeman (a native install's state dir) and anything
  inside the checkout (the image build context). --yes / no TTY take the
  defaults, --setup-only stops after writing the file. An existing .env is
  never edited, and root never runs the setup (Unraid keeps the hand route).
- After `up`, it waits until the server answers (docker exec probe, crash
  loop caught by the restart count) and prints the URL, the LAN URL, the
  generated password and the logs/stop commands; --no-wait skips the wait.
- `changeme` is refused before anything starts (the container publishes on
  every interface and holds the Docker socket); Update-Codeman.sh checks it
  before its build and down so the stack is never left stopped.
- Compose settings are read with ONE config --environment call, with its
  error reported, instead of three silent ones.

docker-compose.yaml and server.Dockerfile are untouched (their hashes gate
the in-app updater), and .env.example changes values and comments only.

Co-Authored-By: Claude Opus 5.5 (1M context) <[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.

config should output both .env and .yml

2 participants