Created
May 26, 2021 05:58
-
-
Save daffodilistic/7b872941389911167da265a7054d4f14 to your computer and use it in GitHub Desktop.
Systemd unit to start a docker container with proper logging
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
[Unit] | |
Description=Odoo Docker Container Service | |
Requires=docker.service network.target | |
After=docker.service network.target | |
[Service] | |
Type=exec | |
User=root | |
Group=google-sudoers | |
WorkingDirectory=/var/docker | |
ExecStart=/usr/local/bin/docker-compose up --remove-orphans | |
ExecStop=/usr/local/bin/docker-compose down --remove-orphans | |
TimeoutStartSec=60 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment