• 21 Posts
  • 908 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.









  • If you’re gonna be switching AC units, you likely want a plug that can switch inductive loads. Most can’t. Well they can but their relays crap out quickly. Here’s an example of a unit rated for inductive loads. It’s for NA and uses Z-wave so it’s not what you’re looking for. They explicitly call out it can be used for AC motors. Some units explicitly say they can’t be used for inductive loads but many don’t and you learn the hard way.