feat: add env-bridge tool for containerized Symfony env loading#916
Merged
Soner (shyim) merged 4 commits intomainfrom Mar 18, 2026
Merged
feat: add env-bridge tool for containerized Symfony env loading#916Soner (shyim) merged 4 commits intomainfrom
Soner (shyim) merged 4 commits intomainfrom
Conversation
Extract LoadSymfonyEnvFile into a dedicated internal/envfile package and add a standalone env-bridge binary that loads Symfony .env files before executing a given command. This enables Docker-based workflows to inject Shopware environment variables without embedding them in the image. Includes a GitHub Actions workflow to build and publish the env-bridge Docker image to GHCR on pushes to main.
59f088d to
05317cb
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extracts Symfony .env loading into a dedicated internal/envfile package, introduces an env-bridge wrapper binary to preload env vars before executing a command (aimed at container/Docker workflows), and adds CI to build/publish an env-bridge Docker image to GHCR.
Changes:
- Moved
LoadSymfonyEnvFileout ofinternal/extensioninto newinternal/envfilepackage and updated callers. - Added
env-bridgebinary to load Symfony env files from the working directory andexeca provided command. - Added
Dockerfile.env-bridgeand a GitHub Actions workflow to build/push anenv-bridgeimage.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/extension/util.go | Removes Symfony env loading from the extension util package. |
| internal/envfile/envfile.go | New shared package implementing Symfony .env loading logic. |
| env-bridge/main.go | New wrapper CLI that loads env files then executes a command. |
| cmd/project/project_storefront_watch.go | Switches storefront watch to use internal/envfile. |
| cmd/project/project_dump.go | Switches dump command env loading to internal/envfile. |
| cmd/project/project_admin_watch.go | Switches admin watch to use internal/envfile. |
| Dockerfile.env-bridge | Adds multi-stage build for a minimal env-bridge container image. |
| .gitignore | Ignores a locally built env-bridge binary output. |
| .github/workflows/env-bridge-docker.yml | Adds workflow to build/push env-bridge image to GHCR. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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
LoadSymfonyEnvFilefrominternal/extensioninto a dedicatedinternal/envfilepackage for better separation of concernsenv-bridgebinary that loads Symfony.envfiles before executing a given command, useful for containerized/Docker workflowsenv-bridgeDocker image to GHCRTest plan
go build ./...succeedsLoadSymfonyEnvFile(admin-watch, storefront-watch, dump) still workenv-bridgebinary loads env files correctlyDockerfile.env-bridgeproduces a working image