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-node
|
||||
volumes:
|
||||
# Per-task volume when scaling replicas > 1 (never share one Mnesia dir).
|
||||
- type: volume
|
||||
source: eventhub-data-{{.Task.Slot}}
|
||||
target: /app/data
|
||||
# Per-task Mnesia via Swarm volume name template when replicas > 1.
|
||||
- eventhub-data:/app/data
|
||||
deploy:
|
||||
replicas: 1
|
||||
endpoint_mode: dnsrr
|
||||
@@ -227,8 +225,8 @@ networks:
|
||||
driver: overlay
|
||||
|
||||
volumes:
|
||||
# eventhub-data-{{.Task.Slot}} created by Swarm from service mount template
|
||||
# (do not use a single shared volume for multi-replica Mnesia)
|
||||
eventhub-data:
|
||||
name: 'eventhub-data-{{.Task.Slot}}'
|
||||
prometheus-data:
|
||||
grafana-data:
|
||||
traefik-logs:
|
||||
|
||||
Reference in New Issue
Block a user