I want to add a volume to my service, but only if the final user gave a folder for it. Otherwise, no volume should be mounted, for the already-prepared image has valid data in a
If you are using Rancher for orchestration, there are escapes {{...}} available you can use for conditional statements in Rancher's version of docker-compose.
Read more about the integrated GO templating system here.