Page tree
Skip to end of metadata
Go to start of metadata

 

We need two things : 

  1. Auto restart the docker service when host is starting up
  2. Auto restart the containers when host is starting up

For systemd

For 1, simply run the command systemctl enable docker.service

For 2, we will add a new file into /etc/systemd/system/

nano /etc/systemd/system/cytomine.service 

[Unit]
Description=Restart Cytomine
Requires=docker.service
After=docker.service


[Service]
ExecStart=/root/Cytomine_src/Cytomine-bootstrap-1.0/restart_keep_data.sh


[Install]
WantedBy=multi-user.target

Where the restart_keep_data.sh is located at /root/Cytomine_src/Cytomine-bootstrap-1.0/. Don't forget to adapt the path to your installation!

Then, you can test it by running 

 

systemctl enable cytomine.service
systemctl start cytomine.service
systemctl status cytomine.service

 

 

  • No labels