Source: HCL KB
In the HCL Knowledge Base, there is an article on how to configure Sametime 12 to start automatically after the operating system starts.
And what is the procedure?
- Create a file similar to the one mentioned below under “/etc/systemd/system”
docker-compose-app.service - Edit this file and add the below entries to that.
[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/opt/sametime/
ExecStart=/usr/bin/docker-compose up -d
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target - Save the file.
Note : Change the “WorkingDirectory” & “ExecStart” path according to your environment. - Run the below command to enable the service to start automatically.
systemctl enable docker-compose-app.service - Run the below command to start the service
systemctl start docker-compose-app.service - Run the below command and check if the docker-compose is started properly
systemctl status docker-compose-app.service
Note: It may take some time to start all the containers. - Check if the Sametime is working properly from the embedded client \ Proxy or meetings.
- If everything is working, do a docker-compose down and restart the OS. Wait for the OS to reboot completely and you can run the command mentioned in step#6 to check if the Sametime server is started.
Troubleshooting - In case any change is done in the “docker-compose-app.service” file, do a “systemctl daemon-reload” to reload the unit.
- In case the service is not loading, run the command “journalctl -xe” \ or systemctl status docker-compose-app.service and check the error associated.
I would use a restart policy in the docker-compose definition, the docker starts the containers on startup. No need to add a systemd service.
https://serverfault.com/questions/998870/docker-compose-restart-policy