Created
October 30, 2020 15:20
-
-
Save deg0nz/80c06e28c0906745490878e802158550 to your computer and use it in GitHub Desktop.
SystemD unit for Docker container Template
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=organizr - HTPC/Homelab Services Organizer | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
TimeoutStartSec=0 | |
Restart=always | |
ExecStartPre=/usr/bin/docker pull organizr/organizr:latest | |
ExecStartPre=-/usr/bin/docker kill %p | |
ExecStartPre=-/usr/bin/docker rm %p | |
# GID and UID = www-data | |
ExecStart=/usr/bin/docker run --rm \ | |
--name=%p \ | |
-v /srv/organizr-v2:/config \ | |
-e PGID=33 -e PUID=33 \ | |
-e TZ=Europe/Berlin \ | |
-e fpm=true \ | |
-e branch=v2-master \ | |
-p 127.0.0.1:8081:80 \ | |
organizr/organizr | |
ExecStop=-/usr/bin/docker stop -t 10 %p | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment