Created
April 25, 2021 20:04
-
-
Save eljojo/885b007b510e211d53451b15d4f60edd to your computer and use it in GitHub Desktop.
traefik.service
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] | |
After=docker.service docker.socket | |
[email protected] | |
[email protected] | |
[Service] | |
ExecStart=/usr/bin/docker run \ | |
--rm \ | |
--name=traefik \ | |
-p '443:443' \ | |
-p '80:80' \ | |
-p '9090:8080' \ | |
-v '/etc/localtime:/etc/localtime:ro' \ | |
-v '/var/lib/traefik/etc:/etc/traefik' \ | |
-v '/var/lib/traefik/var:/var/lib/traefik' \ | |
arm64v8/traefik:v2.2 | |
ExecStartPre=/bin/sh -c "docker rm -f traefik || true" | |
ExecStop=/bin/sh -c "[ $SERVICE_RESULT = success ] || docker stop traefik" | |
ExecStopPost=/bin/sh -c "docker rm -f traefik || true" | |
Restart=always | |
StandardError=null | |
StandardOutput=null | |
TimeoutStartSec=0 | |
TimeoutStopSec=120 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment