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
Poor man's solution:
volumes: ${VARIABLE:-/dev/null}:/app/folder
Or:
volumes: ${VARIABLE:-/dev/null}:${VARIABLE:-/tmp}/app/folder