Skip to content

Instantly share code, notes, and snippets.

@tom-monaco
Created October 27, 2017 06:43
Show Gist options
  • Save tom-monaco/e3e3e2336359d360b9f7267fe031f639 to your computer and use it in GitHub Desktop.
Save tom-monaco/e3e3e2336359d360b9f7267fe031f639 to your computer and use it in GitHub Desktop.
Systemd Unit for Ancient Dockerized Rails App
[Unit]
Description=Start the_app_name Docker Container
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/docker start the_app_name
ExecStop=/usr/bin/docker stop the_app_name
Restart=always
RestartSec=10s
Type=notify
NotifyAccess=all
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment