I’m working with a monorepo project containing workspaces based in pnpm, because all the apps need the full workspace to be available to be able to build I have to use the folder containing the root of the workspace as the source.root for each application.
I’ve been trying to expose values in the PLATFORM_RELATIONSHIPS variable in the deploy hook by doing the following but this does not seem to work.
export REDIS_URL=redis://$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".redis.host")
I kept reading the docs and found information about creating a .environment file in the source.root directory but because the apps have the same source root I’m not sure how to make sure that it only sets environment variables for the current app, I think that I could use an if to check the PLATFORM_APPLICATION_NAME variable to only set environments for the current app but it would be better if I could somehow include it in the applications.yml file or somehow have a separate .environment file for each application.
Thanks for any help!