-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
wardenenv/images#719 - Add PHP-SPX image build #17
Conversation
nginx/etc/nginx/conf.d/default.conf
Outdated
@@ -2,12 +2,17 @@ | |||
resolver 127.0.0.11; | |||
|
|||
# Select upstream backend to use based on presense of Xdebug cookies and Blackfire headers | |||
map "$http_X_BLACKFIRE_QUERY:$cookie_XDEBUG_SESSION$cookie_XDEBUG_PROFILE$cookie_XDEBUG_TRACE$arg_XDEBUG_SESSION$arg_XDEBUG_SESSION_START" $fastcgi_backend { | |||
map "$http_X_BLACKFIRE_QUERY:$cookie_XDEBUG_SESSION$cookie_XDEBUG_PROFILE$cookie_XDEBUG_TRACE$arg_XDEBUG_SESSION$arg_XDEBUG_SESSION_START:$cookie_SPX_ENABLED$cookie_SPX_KEY$arg_SPX_ENABLED$arg_SPX_KEY$arg_SPX_UI_URI" $fastcgi_backend { | |||
volatile; |
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.
@navarr I was having issues with cookies not being respected; however, it could have been because of Varnish caching the requests. This line shouldn't need to be there.
What's the status of this PR? @navarr |
@MagePsycho held up until at minimum I fix PHP images not building |
@bap14, is there instruction how to use this image? :) |
@ihor-sviziev Not yet; however, now that the image is there it can move forward in being a toggled feature for projects. |
For anyone interested, to make SPX in Warden work now, you can add or modify the .warden/warden-env.yml file in your project and add the following things:
where x-volumes and x-extra_hosts are taken from environments/includes/php-fpm.base.yml in your warden installation (the ones above work for 0.15.0) and php-spx is a new container that will handle all requests that have SPX enabled. In order to enable SPX in your requests, add the following cookies or URL params:
To go to your SPX web UI, just use the following URL: https://yourproject.test/?SPX_UI_URI=/ where yourproject.test matches the domain you use for your project. I'm not sure how long it will work this way, since I guess that some easier method of enabling SPX will get added to Warden in the future, but hopefully it will save someone some time setting this up for as long as there's no better way. |
Please notice the following: |
Adds a new SPX image build. Adjusts Nginx configuration to route requests to the SPX container (similar to Xdebug), and prevents Varnish from caching SPX requests.