Open maltokyo opened 4 years ago
Yes. We are automatically deleting images that are not used anymore after update to prevent storage to grow definitively. There is sadly no way of doing it at a finer level than just tell docker to prune everything that is not used.
OK, I thought we could use labels for system prune, let me investigate a bit.
@maltokyo problem with label is that we would need to put them in the 30 differents docker images we use :D
Pruning aside, it also restarts all docker containers (!!) and stops some.
Maybe there should be a disclaimer to run it sandboxed in its own machine, without other services.
The whole point of docker is to run separate services without them intervening with each other. This deployment does the exact opposite.
It started old (stopped) containers I had, and stopped my important services from running!
My server is a mess and I now have to spend hours fixing the damage...
I appreciate BTCPayServer and the development that has been done, as well as the automation you have created for deploying.
But please, add a huge big disclaimer that this interferes with other docker deployments on the machine!
@orfeas0 - There is nothing in the btcpay-update.sh
script which would stop containers, as far as I can see. Which line would do that?
The only command that would affect non-BTCPay Server stuff is docker image prune -af --filter "label!=org.btcpayserver.image=docker-compose-generator"
and this certainly wont stop anything else, it will only remove unused images.
My bad, this was the result of btcpay-setup.sh
, not btcpay-update.sh
.
Which part of setup would stop other containers? I don't get it.
https://docs.docker.com/config/pruning/ Never had problems with a btcpay-setup.sh
My guess is this:
if ! [[ -f "/etc/docker/daemon.json" ]] && [ -w "/etc/docker" ]; then
echo "{
\"log-driver\": \"json-file\",
\"log-opts\": {\"max-size\": \"5m\", \"max-file\": \"3\"}
}" > /etc/docker/daemon.json
echo "Setting limited log files in /etc/docker/daemon.json"
$SYSTEMD_RELOAD && $START && systemctl restart docker
fi
echo -e "BTCPay Server systemd configured in /etc/systemd/system/btcpayserver.service\n"
if $SYSTEMD_RELOAD; then
systemctl daemon-reload
It restarts the docker daemon and reloads systemctl daemon.
I don't understand why we're messing with systemctl. Isn't a "docker-compose up" enough to keep a service running?
I repeat: That's what docker is for: Containerization, separation of apps&services, sandboxing.
A "docker deployment" of an application should not mess with the host OS, at all!
@orfeas0 we can add arguments to the scripts to prevent that. Those lines have been added as people started crashing after undefined period of time as the logs were growing without any control. (this happen fast, especially if some container is running a tight loop logging a lot for a bug, bringing the whole system down)
It doesnt matter as they are non-critical for me, but when I ran btcpay-update.sh today, it deleted/untagged a bunch of non-BTCPay related docker images.
See "Deleted Images" section at the end. Is it normal/ok?
Result of:
# btcpay-update.sh