Hello folks, I wonder if anyone came across the `S...
# docker
s
Hello folks, I wonder if anyone came across the
SPRYKER_BUILD_HASH
env variable while using docker/sdk and found out about how and when i could/should be set to be reflected during build. Most interesting when using baked mode and production building.
a
Hi! It's used to invalidate browser's cache between deployments.
s
Thats exactly why I want to use it, but i do not know how 😄
Is it automatically set by docker/sdk or in PaaS? Do I have to set it on my own?
a
@billowy-agency-83000 do you remember? Or should I look into the history? 🙂
I looked into history of solving the problem for Dominik... It seems that from the application perspective docker/sdk has to be newer than some version, preferably latest. Then: https://github.com/spryker-shop/b2c-demo-shop/blob/202009.0/frontend/settings.js#L99 https://github.com/spryker-shop/b2c-demo-shop/blob/202009.0/config/Yves/frontend-build-config.json#L2 https://github.com/spryker-shop/b2c-demo-shop/blob/master/config/Shared/config_default.php#L498 For demo\production mode
docker/sdk boot && SPRYKER_BUILD_HASH=somehash docker/sdk up
. Then in browser check your assets.
If the project hosted in Spryker's PaaS it may be that adjustments are needed on the infra side as well. Like it was for Dominik back then.
s
ah ok... so directly "injecting" it on up or build.. I will give it a try, thank you
That worked @average-branch-45579. Thanks. It was to easy so I dd not came up with it on my own 😄
👍 1
projekt-code and dockerskd were already ready for this