Last active
February 4, 2021 03:05
-
-
Save JesseBowling/913f8a581361204165f9c0a4da4d1539 to your computer and use it in GitHub Desktop.
Sample SystemD config for CHN
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
[Unit] | |
Description=CHNServer service with docker compose | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
Restart=always | |
WorkingDirectory=/opt/chnserver | |
# Remove old containers and pull updates to current tag | |
ExecStartPre=/usr/bin/docker-compose down | |
ExecStartPre=/usr/bin/docker-compose rm | |
ExecStartPre=/usr/bin/docker-compose pull | |
# Compose up | |
ExecStart=/usr/bin/docker-compose up | |
# Compose down, remove containers | |
ExecStop=/usr/bin/docker-compose down | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment