-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
feat: PHP SPX #820
feat: PHP SPX #820
Conversation
commands/shell.cmd
Outdated
@@ -7,7 +7,9 @@ loadEnvConfig "${WARDEN_ENV_PATH}" || exit $? | |||
## set defaults for this command which can be overridden either using exports in the user | |||
## profile or setting them in the .env configuration on a per-project basis | |||
WARDEN_ENV_SHELL_COMMAND=${WARDEN_ENV_SHELL_COMMAND:-bash} | |||
WARDEN_ENV_SHELL_CONTAINER=${WARDEN_ENV_SHELL_CONTAINER:-php-fpm} | |||
|
|||
WARDEN_ENV_DEFAULT_SHELL_CONTAINER=$([ $WARDEN_PHP_SPX == 1 ] && echo "php-spx" || echo "php-fpm") |
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.
@SamJUK I don't fully agree with this. The warden shell
goes to the standard php-fpm container and warden debug
goes to php-debug container. To me this would seem like we could either add a flag --spx
or create a new warden spx
command to drop to a shell in it.
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.
I also prefer having warden spx
command, similar to warden debug
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.
Makes sense, I'll switch it over to a separate command warden spx
(since AFAIK the flag approach is not widely used across the project)
5f0db7c
to
b52e300
Compare
Great job @SamJUK! |
I updated Warden (alternative installation)
Then ran Then I disabled SPX
And run
|
@monteshot Can you make sure you do not have any SPX related cookies remaining? Or try in Incognito / with another browser? |
@monteshot,
Another option - remove SPX_* cookies from your browser I guess it has to be added to documentation wardenenv/docs#25 (comment) |
Opened a separate issue to track the 502 bad gateway #822 It would be nice if we can avoid adding manual steps to not break your environment when disabling SPX, I can see that causing frustration otherwise. |
I tried to Disable SPX from the UI... I think there is an issue because SPX cookies are still present.
This solution works as a workaround. I think an additional mechanism(on Traefik or somewhere else) should be created only for disabling the feature. |
@SamJUK Unfortunately there are going to end up being manual steps no matter what because disabling the service won't update the cookies in your browser. Just like if you stopped the xdebug container and then sent a request with the |
Supporting work to make use of the new PHP SPX images introduced in wardenenv/images#17
PR for Supporting documentation: wardenenv/docs#25
Key Points:
WARDEN_PHP_SPX
to toggle feature statewarden shell
to automatically pick the correct container depending on the feature flag