Created
January 22, 2021 17:18
-
-
Save dallasmarlow/82e85b505078dba2eb3f88912ebad564 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=example service_a | |
After=docker.service | |
[Service] | |
TimeoutStartSec=5m | |
User=deamon | |
Restart=always | |
RestartSec=30s | |
ExecStartPre=-/bin/bash -c "exec /usr/bin/docker pull service_a:latest" | |
ExecStartPre=-/usr/bin/docker rm -f service_a | |
ExecStart=/bin/bash -c "PATH=$PATH:/opt/bin exec /usr/bin/docker run --name service_a service_a:latest" | |
ExecStop=-/usr/bin/docker kill service_a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment