I have a
docker-compose.yml that is committed in to a git version control.
It has an nfs volume set in it, and it looks as follows.
The issue is that the nfs ip address is hard-coded, which means if the IP if the nfs server change I need to commit a bunch of files.
Is there a way to get this value externally?
I understand that
env_file can’t be set inside a volumes scope, so I am not sure how to do this with an env file for several docker-compoe files.
version: '3.6' services: hello: build: context: . restart: always volumes: - type: volume source: data target: /srv/volume volume: nocopy: true environment: tty: true volumes: data: driver_opts: type: "nfs" o: "addr=192.168.1.1,nolock,soft,rw" device: ":/srv/volume"