Why Nostr? What is Njump?
2024-11-04 20:00:05

captjack on Nostr: how2tip - auto start any docker container app from hosts systemd service ...

how2tip - auto start any docker container app from hosts systemd service debian/ubuntu #linuxstr
docker.service MUST be ENABLED for auto.start itself
sudo docker update --restart unless-stopped 3c82b4-contID
add new service as below exampe redisdb- "systemctl daemon-reload" + "enable" it also after testing
ExecStart=/home/dir/anyapp.sh
nano /etc/systemd/system/mydocappautostart.service
++++++++++++++++
[Unit]
Description=Redis Container
After=docker.service
Requires=docker.service

[Service]
TimeoutStartSec=0
Restart=always
ExecStart=/usr/bin/docker run --rm --name %n redis

[Install]
WantedBy=multi-user.target
++++++++++
Author Public Key
npub1te0uzs6vj29umjaxlqqct82j8q6ppyefrxq06dhr8d6pvwfatgkqjmjgwp