Start docker service on boot
My blog is host on vultr centos vm. The vm is not stable sometimes it auto reboots.
After that my blog is down. So it should be ensured that my blog is auto restarted after each reboot.
This involves two points:
-
Configure docker to start on boot
sudo systemctl enable docker.service sudo systemctl enable containerd.service
-
Setup container restart policy
This can be easily configured by the restart attribute in the compose file of each service.
restart: unless-stopped