Created
October 3, 2018 14:37
-
-
Save Mambix/3c16a1b8c8dd11f10414186368e795d6 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
# /etc/systemd/system/docker-compose-app.service | |
# systemctl enable docker-compose-app | |
[Unit] | |
Description=Docker Compose Application Service | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
WorkingDirectory=/srv/docker | |
ExecStart=/usr/local/bin/docker-compose start | |
ExecStop=/usr/local/bin/docker-compose stop | |
TimeoutStartSec=0 | |
Restart=on-failure | |
StartLimitIntervalSec=60 | |
StartLimitBurst=3 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change the
WorkingDirectory
parameter with your dockerized project path. And enable the service to start automatically: