Skip to content

feat: add env-bridge tool for containerized Symfony env loading#916

Merged
Soner (shyim) merged 4 commits intomainfrom
feat/env-bridge-tool
Mar 18, 2026
Merged

feat: add env-bridge tool for containerized Symfony env loading#916
Soner (shyim) merged 4 commits intomainfrom
feat/env-bridge-tool

Conversation

@shyim
Copy link
Copy Markdown
Member

Summary

  • Extract LoadSymfonyEnvFile from internal/extension into a dedicated internal/envfile package for better separation of concerns
  • Add standalone env-bridge binary that loads Symfony .env files before executing a given command, useful for containerized/Docker workflows
  • Add GitHub Actions workflow to build and publish env-bridge Docker image to GHCR

Test plan

  • Verify go build ./... succeeds
  • Verify existing commands using LoadSymfonyEnvFile (admin-watch, storefront-watch, dump) still work
  • Test env-bridge binary loads env files correctly
  • Verify Docker build from Dockerfile.env-bridge produces a working image

Copilot AI review requested due to automatic review settings March 18, 2026 07:13
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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 LoadSymfonyEnvFile out of internal/extension into new internal/envfile package and updated callers.
  • Added env-bridge binary to load Symfony env files from the working directory and exec a provided command.
  • Added Dockerfile.env-bridge and a GitHub Actions workflow to build/push an env-bridge image.

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.

Comment thread env-bridge/main.go
Comment thread internal/envfile/envfile.go
Comment thread Dockerfile.env-bridge
Comment thread .github/workflows/env-bridge-docker.yml
Comment thread .github/workflows/env-bridge-docker.yml
@shyim Soner (shyim) merged commit 7fff6e8 into main Mar 18, 2026
4 checks passed
@shyim Soner (shyim) deleted the feat/env-bridge-tool branch March 18, 2026 07:25
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