Created
July 20, 2021 20:28
-
-
Save AdonousTech/2fba381b6a860cc3ffe7ed0563ece5b2 to your computer and use it in GitHub Desktop.
This file contains 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 | |
# thanks to oleg belostotsky on stack overflow for this | |
[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