-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker Service deployment (Stack) #515
Comments
Your upgrade process would then look like this:
|
I now have this running at my home network in my Docker Swarm mode cluster. Here is the config:
However I wasn't able to use Docker Configs for this because the AdGuardHome daemon insists on rewriting the config file? It seems the |
Yep, that makes sense indeed. |
Resolved in v0.93 btw. |
I have successfully managed to get AdGuardHome running replicated on a docker swarm cluster. Caveats:
First, create macvlan config on each node that will run AdGuardHome: Node 2: In the above, 192.168.1.53 and 192.168.1.153 are the IP Addresses that AdGuardHome will be available on. On a manager node create a swarm scoped macvlan network: Add a label to each node in the swarm that will run an instance of AdGuardHome:
Create shared data volumes for each instance. In my case I have a gluster volume shared across all nodes and mounted to /mnt/data:
If you want to have more than 2 replicas running, just create additional directories as ns3, ns4... Docker compose file (adguard.yml):
Important bits in the above yaml file:
Deploy the stack: In my deployment I left the "bind_port" in the AdGuardHome.yaml configuration file set to 80, then enabled encryption and set the HTTPS port to 3000. I don't use DNS-over-HTTPS internally just 53/udp so this makes the admin portal available on 3000 with proper certificate included in the config. Note, for the container instance to be able to communicate with outside work via macvlan network the parent interface of the host must be in promiscuous mode Finally, if the host needs to use the container for its dns you will also have to create a macvlan shim interface on the host and add a static route:
This can easily be added to a script and run on boot via a simple systemd unit file. Hope this helps. |
I'd like to see support for running, updating and managing AdGuardHome via docker and more specifically a Docker Swarm set-up using
docker stack deploy
(//Docker Swarm mode is far far far simpler to use and operationalize than k8s!//).Somewhat related is #448
I'm happy to contribute to this but it would also require #377 to be resolved with up-to-date upstream images built in some kind of CI. Ideally using Docker Hub's own Automated Build would be nice. #514 would help a lot with this.
A (//not yet tested//)
adguardhome.yml
(//Docker Stackfile//): would look like this:The text was updated successfully, but these errors were encountered: