fix(swarm): per-slot Mnesia volume via Swarm name template.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -76,10 +76,8 @@ services:
|
|||||||
- eventhub
|
- eventhub
|
||||||
- eventhub-node
|
- eventhub-node
|
||||||
volumes:
|
volumes:
|
||||||
# Per-task volume when scaling replicas > 1 (never share one Mnesia dir).
|
# Per-task Mnesia via Swarm volume name template when replicas > 1.
|
||||||
- type: volume
|
- eventhub-data:/app/data
|
||||||
source: eventhub-data-{{.Task.Slot}}
|
|
||||||
target: /app/data
|
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
endpoint_mode: dnsrr
|
endpoint_mode: dnsrr
|
||||||
@@ -227,8 +225,8 @@ networks:
|
|||||||
driver: overlay
|
driver: overlay
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
# eventhub-data-{{.Task.Slot}} created by Swarm from service mount template
|
eventhub-data:
|
||||||
# (do not use a single shared volume for multi-replica Mnesia)
|
name: 'eventhub-data-{{.Task.Slot}}'
|
||||||
prometheus-data:
|
prometheus-data:
|
||||||
grafana-data:
|
grafana-data:
|
||||||
traefik-logs:
|
traefik-logs:
|
||||||
|
|||||||
Reference in New Issue
Block a user