GreenFrogSB / LMDS

LMDS - Linux Media Delivery System
https://greenfrognest.com
GNU General Public License v3.0
210 stars 45 forks source link

changes saved to docker-compose.yml are being reverted by docker-compose #54

Closed chenks closed 2 years ago

chenks commented 2 years ago

i have an issue manually making changes to the docker-compose.yml file any time i go in and manually change the TZ from UTC to Europe/London or manually change any of the volumes mountings, saving the changes correctly saves the changes to the file.

however, after running docker-compose up -d it seems to revert all my changes back to default.

for example, i changed the sonarr entry to this

  sonarr:
    image: linuxserver/sonarr
    container_name: sonarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - UMASK_SET=022 #optional
    volumes:
      - ./volumes/sonarr/data:/config
      - ./home/chenks/LMDS/media:/tv
      - ./home/chenks/LMDS/downloads:/downloads
    ports:
      - 8989:8989
    restart: unless-stopped

saved the changes, ran the docker command, and it had reverted it back to

 sonarr:
    image: linuxserver/sonarr
    container_name: sonarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
      - UMASK_SET=022 #optional
    volumes:
      - ./volumes/sonarr/data:/config
      - ./media/tvshows:/tv
      - ./downloads:/downloads
    ports:
      - 8989:8989
    restart: unless-stopped

why are my changes being reverted? is it possible i'm making too many changes at once?

GreenFrogSB commented 2 years ago

From LMDS scripting:

There is no reason for this to happen if you only run: docker-compose up -d after modifying docker-compose.yml file.

There would be a reason for this to take place, if after your modifications to docker-compose.yml you run deploy.sh and add or remove a container or two using the script logic, as your compose will be rebuild from templates on this occasion with predefined settings.

There is a hidden folder with templates for every single container from where script takes default settings and rebuilds entire compose each time you add or remove container using the script itself, then and only then it will overwrite your changes to the compose.

You could adjust relevant templates from inside: ls -l .templates/ but as I mentioned earlier if you run docker-compose up -d after modifications and not even starting the script by deploy.sh from script perspective there is nothing that could be done to your compose.

I hope that helps.

chenks commented 1 year ago

sorry to re-open this, but it's just happened again to me. i ran deploy.sh to add a new container, used the "preserve" option when it prompted about the existing containers, and once finished it had reverted the changes i'd made to docker-compose.yml.

surely this can't be an intentional outcome?