Cache mount ID is not prefixed with cache key : Issue with 2 services
tacitus
PROOP

10 months ago

We have a dockerfile that has a cache mount. The issue is that it it deployed to 2 services within our stack. Shell expansion does not seem to work as expected with `--mount` directives so we cannot dynamically set the service ID that way.
If we statically set the service ID the other service build fails.
Is there a solution to this scenario?

Solved

5 Replies

10 months ago

Hello,

Unfortunately, the solution here would be to remove the cache mount.

Best,

Brody


Status changed to Awaiting User Response Railway 10 months ago


tacitus
PROOP

10 months ago

Thank you. Perhaps having a cache namespace under the project id would be a useful enhancement.


Status changed to Awaiting Railway Response Railway 10 months ago


10 months ago

That would end up cache collisions, we currently have it namespaced under a service ID so that the same application can be deployed across multiple environments within a project, because if setup correctly, the same service across multiple environments will have the same service ID.


Status changed to Awaiting User Response Railway 10 months ago


rickyhopkins
PRO

10 months ago

So in this scenario where an application can be deployed to multiple environments, would we then need a different DockerFile for each environment hard coded with the serviceId in each cache key?


Status changed to Awaiting Railway Response Railway 10 months ago


10 months ago

Nope, the service ID is the same for the same service across multiple environments within a project.


Status changed to Awaiting User Response Railway 10 months ago


Railway
BOT

7 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 7 months ago


Loading...