warden icon indicating copy to clipboard operation
warden copied to clipboard

Add ability to cutomize blackfire based images

Open ihor-sviziev opened this issue 4 years ago • 16 comments

Hi,

I started using warden on our own project. I need to use custom php-fpm and php-debug images because we're using additional PHP extensions that are not bundled with Warden (in the .warden/warden-env.yml file). So far, I wasn't able to find a way to override the php-blackfire image.

ihor-sviziev avatar Jan 13 '21 10:01 ihor-sviziev

Can you confirm how you attempted to override them?

I would think they'd be overrideable by specifying a different image for the php-blackfire service, and the blackfire-agent service if necessary

navarr avatar Jan 13 '21 13:01 navarr

Basically, if I'll add them to the .warden/warden-env.yml file - these services will also be created even when I'll have WARDEN_BLACKFIRE=0 in my .env config. I have a feeling that it's not supported yet

ihor-sviziev avatar Jan 13 '21 13:01 ihor-sviziev

I don't have time to attempt this right now, so I'm going to document my notes here:

This might be possible by updating https://github.com/davidalger/warden/blob/495176185a6cfbdff5f775b3f91ecc84d7dd3959/utils/env.sh#L77 such that it also searches the WARDEN_ENV_PATH for matching files.

navarr avatar Jan 13 '21 14:01 navarr

Apart from changing lines like this:

    image: docker.io/wardenenv/php-fpm:${PHP_VERSION:-7.4}${WARDEN_SVC_PHP_VARIANT:-}-blackfire

to something like:

    image: ${WARDEN_SVC_PHP_BLACKFIRE_IMAGE:-docker.io/wardenenv/php-fpm}:${PHP_VERSION:-7.4}${WARDEN_SVC_PHP_VARIANT:-}-blackfire

so the image name could be overridden (would still require the same tagging format), I think the only way to make it happen is what @navarr suggests adding WARDEN_ENV_PATH to the list of search paths appendEnvPartialIfExists is using.

If someone wants to put together a PR for this, I'd accept it. Curious edge case, but common enough I'm wondering if adding variables to allow easily replacing the image might be a better solve.

davidalger avatar Jan 18 '21 03:01 davidalger

I think it would be good to provide the ability to override not only Blackfire images but all images used in projects

Den4ik avatar Feb 15 '21 09:02 Den4ik

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar May 16 '21 16:05 stale[bot]

Let's keep this issue open

ihor-sviziev avatar May 17 '21 05:05 ihor-sviziev

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Aug 15 '21 06:08 stale[bot]

Still actual

ihor-sviziev avatar Aug 15 '21 06:08 ihor-sviziev

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Nov 13 '21 23:11 stale[bot]

Keep it open

ihor-sviziev avatar Nov 14 '21 05:11 ihor-sviziev

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Feb 12 '22 12:02 stale[bot]

keep it, please

ihor-sviziev avatar Feb 14 '22 15:02 ihor-sviziev

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar May 25 '22 22:05 stale[bot]

Actual

Den4ik avatar May 26 '22 06:05 Den4ik

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Sep 16 '22 01:09 stale[bot]

I believe this is resolved by 5a24ca7d50790e35d7856ef5aaa9002040ff5e46. Please correct me if I am wrong.

navarr avatar Jan 17 '23 04:01 navarr