#!/bin/bash


cat >/root/app-install/komga/update-komga.sh<<EOF

#!/bin/bash

docker container stop komga
sleep 3
docker container rm komga

docker image rmi gotson/komga:latest

docker run \
    --name=komga \
    -d \
    -p 8091:8080 \
    -v /data/komga/config:/config \
    -v /data/komga/data:/data \
    -v /data/nextcloud/data/zeaslity/files/MasterLoad/Java/komga-book:/netcloud-java-book \
    --restart unless-stopped \
    gotson/komga:latest

EOF

docker container stop komga && docker container rm komga