Skip to content
IT related

Systemd service

Updated 1 min read

Systemctl file for creating a service

Documentation for creating the docker applicaiton is here docker-compose

Here is a basic service file for starting and stopping a docker-compose conatiner.

[Unit]

Description=PhotoPrism services with Docker Compose

PartOf=docker.service

After=docker.service

[Service]

Type=oneshot

RemainAfterExit=true

WorkingDirectory=/home/ed/docker/photoprism-docker/

ExecStart=/usr/bin/docker-compose -p photo start

ExecStop=/usr/bin/docker-compose -p photo stop

[Install]

WantedBy=multi-user.target

Place the file in the following directory

/etc/systemd/system/yourservice.service

Run the following command to make the service run on startup

sudo systemctl enable /etc/systemd/system/Yourservice

Attachments

  • backup1-dcmgd
  • backup1-dcmnw
  • backup1-karismatest
IT related RSS feed Published with Oblish

Keyboard shortcuts

/
Search
[
Previous page
]
Next page
?
Show this list
Esc
Close