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

a year 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

a year ago

Hello,

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

Best,

Brody


Status changed to Awaiting User Response Railway about 1 year ago


tacitus
PROOP

a year ago

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


Status changed to Awaiting Railway Response Railway about 1 year ago


a year 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 about 1 year ago


rickyhopkins
PRO

a year 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 about 1 year ago


a year 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 about 1 year ago


Railway
BOT

9 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 10 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...