Skip to content

Instantly share code, notes, and snippets.

@kelseyhightower
Created August 18, 2014 22:59
Show Gist options
  • Save kelseyhightower/adfdfb494b2a047ad530 to your computer and use it in GitHub Desktop.
Save kelseyhightower/adfdfb494b2a047ad530 to your computer and use it in GitHub Desktop.
[Unit]
Description=Application
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Environment="PORT=3000"
ExecStartPre=/usr/bin/wget -N -P /opt/bin http://192.168.12.1/app
ExecStartPre=/usr/bin/chmod +x /opt/bin/app
ExecStart=/opt/bin/app
ExecStartPost=/usr/bin/etcdctl set /services/app/%H %H:3000
ExecStopPost=/usr/bin/etcdctl rm /services/app/%H
[X-Fleet]
X-Conflicts=app*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment