Skip to content

Instantly share code, notes, and snippets.

View scyto's full-sized avatar

scyto

  • Seattle, WA, USA
  • 10:57 (UTC -07:00)
View GitHub Profile
@scyto
scyto / watchtower-template.md
Created February 12, 2022 21:04
watchtower swarm template

Description

This template runs watchtower. This is new for me so still seeing if i like it! (fingers cross this works, yes need to setuyp smtp email at some point, lol)

State Considerations for SWARM

none, this container can be cofigured entirely by env vars so i use those

Network Considerations

none, no published port is needed

@scyto
scyto / unifi-poller.template.md
Last active November 12, 2024 07:10
unifi poller swarm template

Description

This is my most complex stack to date. It runs the unifi-poller (uPoller) application consisting of an influx database, grafana dashboard and the uPoller collector.

State Considerations for SWARM

This has a lot of state (database, provisioning directory for granfa, state for grafana, config file for upoller, etc.)

This time i chose to store each of these in their own glusterfs volume mount using the gluster volumefs driver.

This has the advatages of creating folders that alread have the uid:gid of the grafan container (instead of messing around with chown and chmod)

@scyto
scyto / infinitude-template.md
Last active February 24, 2025 09:24
infinitude for Carrier Infinity Thermostats (and Bryant)

Description

This template runs my infinitude proxy instance. This enables Carrier Inifinity Thermostats to be controlled by API, web page, home assistant etc) One note please for the love of god never buy a carrier heating system with one of these controls they are terrible in my experience. I inherited it, instead buy a nice generic heating/AC system that can support any standard thermostat.

State Considerations for SWARM

none, this container can be cofigured entirely by env vars so i use those

Network Considerations

none, this published port of 4000 for this container oveeride the interall 3000 because i have container that needed 3000 it can be reached by swarmIP:4000

@scyto
scyto / cloudflareddns-template.md
Created February 13, 2022 03:15
cloudflare DDNS updater swarm template

Description

This template runs my cloudflare dynamic DNS updater. It adjust the default container cron job from 5 minutes to 1 minute because i have failover WAN ports.

State Considerations for SWARM

none, this container can be cofigured entirely by env vars so i use those

Network Considerations

none, this need no special port mappings or other considerations consider using an secret to store the API

@scyto
scyto / portainer-agent-template.md
Last active February 24, 2025 09:24
migrate portainer agent to be managed by portainer

Description

This template deploys the portainer agent via portainer. I wanted a way to update the agent independently from the portainer web app. This is not a supported deployment architecture by portainer (which makes it odd they have the agent template in templates, any hoo)

DO NOT DO ANY OF THIS UNLESS YOU ARE PREPARED TO RESINTALL PORTAINER AND ITS AGENTS IF YOU GET ANY STEP WRONG YOU WILL BREAK PORTAINER

State Considerations for SWARM

none, this container can be cofigured entirely by the stack file

Network Considerations

@scyto
scyto / traefik-template.md
Last active August 18, 2023 21:51
traefik swarm template

Description

This template runs my experimental traefik server for evaluating if i move to it from handcrafted nginx proxy.

State Considerations for SWARM

traefik requires a static configuration - you need to pick either file based on command line based (or all commands need to be in your stack). you cannot mix these - for example if you put some settigs in a file doing additonal static config via command line then things kike env vars will be ignored i chose to put the static config in a traefik.yml file this seems to be considerd best practice in 2.6 by some i also configured a dynamic files folder - this is for aything that can't or shouldn't be configured in a docker file (middlewares, non-docker related routers etc)

Network Considerations

@scyto
scyto / adguard-template.md
Last active February 24, 2025 09:24
adguard two node setup with adguard sync

Description

UPDATED 9/2/2023 - here we are a few years later, adguuard has been stable as heck now i wanted to add IPv6 to this mix these were the steps

  1. stop the stack
  2. delete the 6 adguard config networks and the two deployed macvlans from within portainer
  3. recreate using the instructions below adding the following for IPv6 (note the Ipv6 are the documented subnet examples - don't use them, use ones right for your network)
@scyto
scyto / dhcp_option119.py
Created February 20, 2022 06:23 — forked from SmartFinn/dhcp_option119.py
a script for converting domain names to DHCP Option 119 (Domain Search Option)
#!/usr/bin/env python3
"""Command generator for setting DHCP Option 119
This script converts the specified domain names to DHCP Option 119
(Domain Search Option) and prints commands for various DHCP servers.
USAGE:
./dhcp_option119.py DOMAIN ...
EXAMPLE:
@scyto
scyto / glsuterfs-volume-plugin.md
Last active February 24, 2025 09:58
installing a glusterfs volume plugin

Description

I wanted a simpler way to assign gluster volumes in new stacks without having to create directories by hand There are variety of community plugins for this.

I chose to use this one https://github.com/chrisbecke/glusterfs-volume It creates a directory called <stackname>_<volumename> for each volume defined in the stack.

Pre-reqs

Assume you setup glusterfs per this gist here

@scyto
scyto / swarm-updating-shepherd.md
Created May 15, 2022 02:05
use shepherd to update images

Update Swarm Images

i wanted to update swarm images whenever there is a new image available (even at the risk of breaking something)

it seems watchtower can't do this for swarm stacks/services - only one off containers.

I found this great container from https://github.com/djmaze/shepherd

placement considerations

Must be placed on a manager node.