• 32 Posts
  • 1.6K Comments
Joined 1 year ago
cake
Cake day: July 5th, 2023

help-circle





  • You could use a systemd unit file:

    [Unit]
    Description=docker_compose_systemd-sonarr
    After=docker.service 
    Requires=docker.service
    
    [Service]
    TimeoutStartSec=0
    
    WorkingDirectory=/var/lib/sonarr
    
    ExecStartPre=-/usr/bin/docker compose kill --remove-orphans
    ExecStartPre=-/usr/bin/docker compose down --remove-orphans
    ExecStartPre=-/usr/bin/docker compose rm -f -s -v
    ExecStartPre=-/usr/bin/docker compose pull
    ExecStart=/usr/bin/docker compose up
    
    Restart=always
    RestartSec=30
    
    [Install]
    WantedBy=multi-user.target
    

    You’d place your compose file in the working dir /var/lib/sonarr. Depending on what tag you’ve set for the image in the compose file, it would be autoupdated, or stay fixed. E.g. lscr.io/linuxserver/sonarr:latest would get autoupdated whereas lscr.io/linuxserver/sonarr:4.0.10 would keep the container at version 4.0.10. If you want to update from 4.0.10, you’d have to change it in the compose file.







  • The parent asked how do you define at all. What I wrote is just the dumbest way which demonstrates how it can be done. This dumb solution holds up even in your scenario because new media doesn’t gain significant user base every other year. If the list is outdated, containing Facebook and Instagram alone, that would still capture a huge part of the problem already. You can probably figure a slightly less dumb alternative that wouldn’t require amendments just to add another platform. Folks talking about the impossibility of defining something or implementing something in law often ignore obvious solutions, existing working processes, and present this false dichotomy of a perfect solution vs impossible to solve. Sometimes it’s a matter of ignorance, other times it’s driven by (conscious or subconscious) libertarian beliefs.