Skip to content

Instantly share code, notes, and snippets.

@eljojo
Created April 25, 2021 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eljojo/885b007b510e211d53451b15d4f60edd to your computer and use it in GitHub Desktop.
Save eljojo/885b007b510e211d53451b15d4f60edd to your computer and use it in GitHub Desktop.
traefik.service
[Unit]
After=docker.service docker.socket
After=ifup@eth0.service
Wants=ifup@eth0.service
[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