Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reiallenramos/b989da897e04fabb270e3f0aafe423b0 to your computer and use it in GitHub Desktop.
Save reiallenramos/b989da897e04fabb270e3f0aafe423b0 to your computer and use it in GitHub Desktop.
system unit file for nuxtjs-otp-boilerplate Lightsail instance
# /etc/systemd/system/docker-compose-app.service
# based on https://github.com/mikegcoleman/todo/blob/master/docker-compose-app.service
[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
# match the below to wherever you copied your docker-compose.yml
WorkingDirectory=/srv/docker
ExecStart=/usr/local/bin/docker-compose up -d
ExecStop=/usr/local/bin/docker-compose down
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment