consul
Some checks are pending
Deploy on push / detect (push) Waiting to run
Deploy on push / deploy_swarm (push) Blocked by required conditions
Deploy on push / deploy_compose (push) Blocked by required conditions

This commit is contained in:
traveler 2026-02-13 08:09:09 -06:00
parent 0d192da290
commit 84a9b23676

72
swarm/consul.yaml Normal file
View file

@ -0,0 +1,72 @@
networks:
netgrimoire:
external: true
services:
consul-server:
image: consul:latest
hostname: "consul-{{.Task.Slot}}"
command: >
agent -server
-bootstrap-expect=3
-ui
-client=0.0.0.0
-bind='{{ GetInterfaceIP "eth0" }}'
-retry-join=tasks.consul-server
-datacenter=netgrimoire
ports:
- target: 8500
published: 8500
protocol: tcp
mode: host
- target: 8600
published: 8600
protocol: udp
mode: host
- target: 8600
published: 8600
protocol: tcp
mode: host
networks:
- netgrimoire
volumes:
- consul-data:/consul/data
deploy:
mode: replicated
replicas: 3 # Changed from 1 to 3
placement:
constraints:
- node.role == manager
max_replicas_per_node: 1
restart_policy:
condition: any
delay: 5s
max_attempts: 3
window: 120s
update_config:
parallelism: 1
delay: 30s
registrator:
image: gliderlabs/registrator:latest
command: >
-internal
-retry-attempts=10
-retry-interval=2000
consul://tasks.consul-server:8500
volumes:
- /var/run/docker.sock:/tmp/docker.sock
networks:
- netgrimoire
depends_on:
- consul-server
deploy:
mode: global # Runs on ALL 6 nodes
restart_policy:
condition: any
delay: 5s
volumes:
consul-data:
driver: local