feat: add env_migrate task for the 2.x to 3.x configuration conversion#40
Open
turegjorup wants to merge 1 commit into
Open
feat: add env_migrate task for the 2.x to 3.x configuration conversion#40turegjorup wants to merge 1 commit into
turegjorup wants to merge 1 commit into
Conversation
Wraps the api console command app:utils:convert-env-to-3x (display-api-service >= 2.8, os2display/display-api-service#495): runs it inside the api container and redirects the dotenv document to .env.symfony.migrated on the host, where it survives container restarts. - stdout/stderr split: the document goes through the redirect, the command's notes and warnings stay visible on the terminal. - Defaults --app-url from COMPOSE_SERVER_DOMAIN so the admin/client config.json conversion works out of the box; extra CLI args are forwarded (task env_migrate -- --skip-config-json). - Friendly error when the pinned api image predates the command. - Writes via a temp file so a failed run cannot leave a truncated result; .env.symfony.migrated* is gitignored (it contains secrets). Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
Summary
Adds an
env_migratewrapper task that converts the configuration of the running 2.x installation to a 3.x-shaped env file on the host. It wraps the api console commandapp:utils:convert-env-to-3x(os2display/display-api-service#495, ships with display-api-service >= 2.8) and redirects its stdout to.env.symfony.migrated, so the result survives container restarts —--fileinside the container would not.Features Added
task env_migrate: runsapp:utils:convert-env-to-3x --output=envin theapicontainer withexec -Tand redirects the dotenv document to.env.symfony.migratedon the host. The command emits the document on stdout and all notes/warnings on stderr, so the file stays a clean parseable dotenv while the operator still sees warnings in the terminal.--app-urldefaulting: the site's public URL is taken fromCOMPOSE_SERVER_DOMAINin.env.docker.localso the admin/clientconfig.jsonconversion works out of the box; any caller-supplied--app-urlwins, and other args are forwarded (task env_migrate -- --skip-config-json)..env.symfony.migrated*is gitignored since the file contains secrets (APP_SECRET, DB credentials, OIDC client secrets).Files Changed
Taskfile.yml— newenv_migratetask + entry in the default help listingREADME.md— "Upgrading to 3.x" task documentationCHANGELOG.md— unreleased entry.gitignore— ignore.env.symfony.migrated*Test Plan
task --listparses and shows the new tasktask env_migratewithout a running stack prints the friendly version hint and exits non-zero🤖 Generated with Claude Code