forked from Yeraze/meshmonitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.upgrade.yml
More file actions
54 lines (51 loc) · 1.72 KB
/
Copy pathdocker-compose.upgrade.yml
File metadata and controls
54 lines (51 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Docker Compose Upgrade Overlay
# Adds automatic upgrade capability via watchdog sidecar
#
# Usage:
# docker compose -f docker-compose.yml -f docker-compose.upgrade.yml up -d
#
# This adds a lightweight sidecar container that monitors for upgrade triggers
# and automatically pulls new images and restarts the main container when
# an upgrade is requested through the MeshMonitor UI.
#
# Note: The upgrade-watchdog.sh script is automatically deployed to
# /data/.meshmonitor-internal directory by the meshmonitor container on startup.
services:
meshmonitor:
environment:
# Enable auto-upgrade functionality
- AUTO_UPGRADE_ENABLED=true
# Upgrade watchdog sidecar
meshmonitor-upgrader:
image: docker:latest
container_name: meshmonitor-upgrader
restart: unless-stopped
volumes:
# Docker socket for container control
- /var/run/docker.sock:/var/run/docker.sock
# Shared data volume to monitor trigger file and access upgrade script (rw for status file)
- meshmonitor-data:/data
# Mount docker-compose directory for proper recreation
- .:/compose:ro
environment:
- CONTAINER_NAME=meshmonitor
- IMAGE_NAME=ghcr.io/yeraze/meshmonitor
- TRIGGER_FILE=/data/.upgrade-trigger
- STATUS_FILE=/data/.upgrade-status
- CHECK_INTERVAL=5
- COMPOSE_PROJECT_DIR=/compose
- COMPOSE_PROJECT_NAME=meshmonitor
command: /data/.meshmonitor-internal/upgrade-watchdog.sh
depends_on:
- meshmonitor
networks:
- default
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Volumes need to be defined in overlay files when referenced by services
volumes:
meshmonitor-data:
driver: local