Snippet of my docker-compose.yml
ports:
- "5000:5000"
volumes:
- "./:/code"
- "${HOST_FILESTORAGE_PATH}:${DOCKER_FILESTORAGE_PATH}"
Problem is, this second volume will only be needed on certain cases, in other cases I don't need it.
Solutions I thought of :
- If I don't need it, substitute HOST_FILE_STORAGE_PATH and DOCKER_FILESTORAGE_PATH for values that won't make a difference nor break anything, which value could this be?
- Instead of using variables on docker-compose, is it possible to pass additional volumes when running docker-compose up/run?