-
-
Notifications
You must be signed in to change notification settings - Fork 32
Implement compose file environment variable support #1131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement compose file environment variable support #1131
Conversation
This change allows users to specify compose files via the COMPOSE_FILE environment variable. It also ensures that the COMPOSE_FILE variable is unset after use to prevent unintended side effects. Co-authored-by: burak.kaya <[email protected]>
|
Cursor Agent can help with this pull request. Just |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: burak.kaya <[email protected]>
Co-authored-by: burak.kaya <[email protected]>
Co-authored-by: burak.kaya <[email protected]>
| cmdArgs = command.cmdArgs; | ||
| dockerComposeOverride = command.dockerComposeOverride; | ||
| // Always unset COMPOSE_FILE to avoid conflicts with explicit -f flags | ||
| env.COMPOSE_FILE = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| cmdArgs = command.cmdArgs; | ||
| dockerComposeOverride = command.dockerComposeOverride; | ||
| // Always unset COMPOSE_FILE to avoid conflicts with explicit -f flags | ||
| env.COMPOSE_FILE = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: burak.kaya <[email protected]>
betegon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging thiis!
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @spotlightjs/[email protected] ### Minor Changes - Added spotlight sdk for helping others to build on top of it ([#1140](#1140)) - Support COMPOSE_FILE environment variable for Docker Compose projects ([#1131](#1131)) - Prompt user to choose between docker compose and package.json when both are present ([#1120](#1120)) ### Patch Changes - Refactor docker compose support ([#1121](#1121)) - disable sentry in development mode ([#1143](#1143)) - **Security:** Restrict CORS origins for Sidecar to prevent unauthorized access ([#1138](#1138)) The Sidecar now only accepts requests from trusted origins: - `localhost` with any port or protocol (http/https) - `https://spotlightjs.com` and `https://*.spotlightjs.com` (HTTPS only, default port)⚠️ **Potentially Breaking:** If you were accessing the Sidecar from other origins (e.g., custom domains, non-HTTPS spotlightjs.com), those connections will now be rejected. This change improves security by preventing malicious websites from connecting to your local Sidecar instance. - Fix file capture error handling to log errors instead of crashing when SPOTLIGHT_CAPTURE is enabled ([#1142](#1142)) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Miguel Betegón <[email protected]>
Addresses #1089 (comment)
This PR implements support for the
COMPOSE_FILEenvironment variable, allowing users to specify one or more Docker Compose files via an environment variable, aligning with native Docker Compose behavior.Key changes:
COMPOSE_FILE: Spotlight now checks theCOMPOSE_FILEenvironment variable first to determine which compose files to use.COMPOSE_FILEis set, automatic detection ofdocker-compose.override.ymlis skipped, matching native Docker Compose behavior.COMPOSE_FILE(separated by:on Unix,;on Windows).COMPOSE_FILEvariable is unset in the spawned Docker Compose process to prevent conflicts with explicitly passed-fflags.