Skip to content

Instantly share code, notes, and snippets.

@smartass08
Created July 6, 2021 01:20
Show Gist options
  • Save smartass08/ae9919ba5ce4a7af10972f75bf809cc9 to your computer and use it in GitHub Desktop.
Save smartass08/ae9919ba5ce4a7af10972f75bf809cc9 to your computer and use it in GitHub Desktop.
/etc/systemd/system/pihole.service
[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
Environment="DOCKER_CLIENT_TIMEOUT=120"
Environment="COMPOSE_HTTP_TIMEOUT=120"
RemainAfterExit=true
WorkingDirectory=/home/smartass08/pihole
ExecStart=/home/smartass08/.nix-profile/bin/docker-compose up -d
ExecStop=/home/smartass08/.nix-profile/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