Skip to content

Commit dd3672d

Browse files
committed
fix (watchtower auto-update scope): add labels to apps to address #141
1 parent cfb2b35 commit dd3672d

File tree

5 files changed

+44
-2
lines changed

5 files changed

+44
-2
lines changed

config/app-config.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"hostname": "${DEVICE_NAME}_earnapp",
1111
"image": "fazalfarhan01/earnapp:lite",
1212
"environment": ["EARNAPP_UUID=$EARNAPP_UUID", "EARNAPP_TERM=yes"],
13+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
1314
"volumes": [".data/.earnapp:/etc/earnapp"],
1415
"restart": "always",
1516
"cpus": "${APP_CPU_LIMIT_MEDIUM}",
@@ -44,6 +45,7 @@
4445
"hostname": "${DEVICE_NAME}_honeygain",
4546
"image": "honeygain/honeygain:latest",
4647
"environment": ["HONEYGAIN_DUMMY=''"],
48+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
4749
"command": "-tou-accept -email $HONEYGAIN_EMAIL -pass $HONEYGAIN_PASSWORD -device $DEVICE_NAME",
4850
"restart": "always",
4951
"cpus": "${APP_CPU_LIMIT_MEDIUM}",
@@ -75,6 +77,7 @@
7577
"hostname": "${DEVICE_NAME}_iproyalpawns",
7678
"image": "iproyal/pawns-cli:latest",
7779
"environment": ["IPROYALPAWNS_DUMMY=''"],
80+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
7881
"command": "-accept-tos -email=$IPROYALPAWNS_EMAIL -password=$IPROYALPAWNS_PASSWORD -device-name=$DEVICE_NAME -device-id=id_$DEVICE_NAME",
7982
"restart": "always",
8083
"cpus": "${APP_CPU_LIMIT_LITTLE}",
@@ -106,6 +109,7 @@
106109
"hostname": "${DEVICE_NAME}_packetstream",
107110
"image": "packetstream/psclient:latest",
108111
"environment": ["CID=$PACKETSTREAM_CID"],
112+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
109113
"restart": "always",
110114
"cpus": "${APP_CPU_LIMIT_MEDIUM}",
111115
"mem_reservation": "${APP_MEM_RESERV_MEDIUM}",
@@ -135,6 +139,7 @@
135139
"hostname": "${DEVICE_NAME}_traffmonetizer",
136140
"image": "traffmonetizer/cli_v2:latest",
137141
"environment": ["TRAFFMONETIZER_DUMMY=''"],
142+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
138143
"command": "start accept status --token $TRAFFMONETIZER_TOKEN --device-name $DEVICE_NAME",
139144
"restart": "always",
140145
"cpus": "${APP_CPU_LIMIT_LITTLE}",
@@ -168,6 +173,7 @@
168173
"RP_EMAIL=$REPOCKET_EMAIL",
169174
"RP_API_KEY=$REPOCKET_APIKEY"
170175
],
176+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
171177
"restart": "always",
172178
"cpus": "${APP_CPU_LIMIT_MEDIUM}",
173179
"mem_reservation": "${APP_MEM_RESERV_MEDIUM}",
@@ -198,6 +204,7 @@
198204
"hostname": "${DEVICE_NAME}_earnfm",
199205
"image": "earnfm/earnfm-client:latest",
200206
"environment": ["EARNFM_TOKEN=$EARNFM_APIKEY"],
207+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
201208
"restart": "always",
202209
"cpus": "${APP_CPU_LIMIT_MEDIUM}",
203210
"mem_reservation": "${APP_MEM_RESERV_MEDIUM}",
@@ -231,6 +238,7 @@
231238
"DEVICE_NAME=$DEVICE_NAME",
232239
"UUID=$PROXYRACK_UUID"
233240
],
241+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
234242
"restart": "always",
235243
"cpus": "${APP_CPU_LIMIT_BIG}",
236244
"mem_reservation": "${APP_MEM_RESERV_BIG}",
@@ -264,6 +272,7 @@
264272
"hostname": "${DEVICE_NAME}_proxylite",
265273
"image": "proxylite/proxyservice:latest",
266274
"environment": ["USER_ID=$PROXYLITE_USERID"],
275+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
267276
"restart": "always",
268277
"cpus": "${APP_CPU_LIMIT_BIG}",
269278
"mem_reservation": "${APP_MEM_RESERV_BIG}",
@@ -296,6 +305,7 @@
296305
"BITPING_EMAIL=$BITPING_EMAIL",
297306
"BITPING_PASSWORD=$BITPING_PASSWORD"
298307
],
308+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
299309
"volumes": [".data/.bitpingd:/root/.bitpingd"],
300310
"restart": "always",
301311
"cpus": "${APP_CPU_LIMIT_BIG}",
@@ -329,6 +339,7 @@
329339
"image": "packetshare/packetshare:latest",
330340
"command": "-accept-tos -email=${PACKETSHARE_EMAIL} -password=${PACKETSHARE_PASSWORD}",
331341
"environment": ["PACKETSHARE_DUMMY=''"],
342+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
332343
"restart": "always",
333344
"cpus": "${APP_CPU_LIMIT_MEDIUM}",
334345
"mem_reservation": "${APP_MEM_RESERV_MEDIUM}",
@@ -362,6 +373,7 @@
362373
"GRADIENT_EMAIL=$GRADIENT_EMAIL",
363374
"GRADIENT_PASS=$GRADIENT_PASSWORD"
364375
],
376+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
365377
"volumes": [".data/.gradient:/app/chrome_user_data"],
366378
"restart": "always",
367379
"cpus": "${APP_CPU_LIMIT_BIG}",
@@ -396,6 +408,7 @@
396408
"USER_ID=$PROXYBASE_USERID",
397409
"DEVICE_NAME=${DEVICE_NAME}"
398410
],
411+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
399412
"restart": "always",
400413
"cpus": "${APP_CPU_LIMIT_BIG}",
401414
"mem_reservation": "${APP_MEM_RESERV_BIG}",
@@ -428,6 +441,7 @@
428441
"WIPTER_EMAIL=$WIPTER_EMAIL",
429442
"WIPTER_PASSWORD=$WIPTER_PASSWORD"
430443
],
444+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
431445
"ports": [
432446
"${WIPTER_PORT_1}:5900",
433447
"${WIPTER_PORT_2}:6080"
@@ -466,6 +480,7 @@
466480
"hostname": "${DEVICE_NAME}_mystnode",
467481
"image": "mysteriumnetwork/myst:latest",
468482
"environment": ["MYSTNODE_DUMMY=''"],
483+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
469484
"command": "service --agreed-terms-and-conditions",
470485
"cap_add": ["NET_ADMIN"],
471486
"ports": ["${MYSTNODE_PORT}:4449"],
@@ -507,6 +522,7 @@
507522
"CODE=$SPEEDSHARE_CODE",
508523
"SPEEDSHARE_UUID=$SPEEDSHARE_UUID"
509524
],
525+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
510526
"restart": "always",
511527
"cpus": "${APP_CPU_LIMIT_BIG}",
512528
"mem_reservation": "${APP_MEM_RESERV_BIG}",
@@ -537,6 +553,7 @@
537553
"USER_PASSWORD=$GRASS_PASSWORD"
538554
],
539555
"volumes": [".data/.grass:/app/chrome_user_data"],
556+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
540557
"restart": "always",
541558
"cpus": "${APP_CPU_LIMIT_BIG}",
542559
"mem_reservation": "${APP_MEM_RESERV_BIG}",
@@ -568,6 +585,7 @@
568585
"image": "mrcolorrain/peer2profit:latest",
569586
"environment": ["P2P_EMAIL=$PEER2PROFIT_EMAIL"],
570587
"ports": ["5901:5900"],
588+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
571589
"restart": "always",
572590
"cpus": "${APP_CPU_LIMIT_HUGE}",
573591
"mem_reservation": "${APP_MEM_RESERV_HUGE}",
@@ -603,6 +621,7 @@
603621
"environment": ["DAWN_EMAIL=$DAWN_EMAIL", "DAWN_PASS=$DAWN_PASSWORD"],
604622
"volumes": [".data/.dawn:/app/chrome_user_data"],
605623
"ports": ["${DAWN_PORT}:5000"],
624+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
606625
"restart": "always",
607626
"cpus": "${APP_CPU_LIMIT_BIG}",
608627
"mem_reservation": "${APP_MEM_RESERV_BIG}",
@@ -638,6 +657,7 @@
638657
"TENEO_PASS=$TENEO_PASSWORD"
639658
],
640659
"volumes": [".data/.teneo:/app/chrome_user_data"],
660+
"labels": ["com.centurylinklabs.watchtower.enable=true"],
641661
"restart": "always",
642662
"cpus": "${APP_CPU_LIMIT_BIG}",
643663
"mem_reservation": "${APP_MEM_RESERV_BIG}",

config/m4b-config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"project": {
3-
"project_version": "4.11.6",
3+
"project_version": "4.11.7",
44
"compose_project_name": "money4band",
55
"ds_project_server_url": "https://discord.com/invite/Fq8eeazBAD"
66
},
@@ -34,6 +34,9 @@
3434
},
3535
"default_docker_platform": "linux/amd64"
3636
},
37+
"watchtower": {
38+
"enable_labels": true
39+
},
3740
"menu": [
3841
{
3942
"label": "Show supported apps' links",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
name = "money4band"
44
description = "Multi-app Docker orchestrator for passive income apps"
5-
version = "4.11.1"
5+
version = "4.11.7"
66
authors = [
77
{ name = "MRColorR" }
88
]

template/user-config.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@
134134
"PROXY=${STACK_PROXY_URL}",
135135
"EXTRA_COMMANDS=ip rule add iif lo ipproto udp dport 53 lookup main;"
136136
],
137+
"labels": [
138+
"com.centurylinklabs.watchtower.enable=true"
139+
],
137140
"cap_add": ["NET_ADMIN"],
138141
"privileged": true,
139142
"network_mode": "bridge",
@@ -151,12 +154,16 @@
151154
"hostname": "${DEVICE_NAME}_watchtower",
152155
"image": "nickfedor/watchtower:latest",
153156
"environment": [
157+
"WATCHTOWER_LABEL_ENABLE=${M4B_WATCHTOWER_LABELS}",
154158
"WATCHTOWER_POLL_INTERVAL=14400",
155159
"WATCHTOWER_ROLLING_RESTART=true",
156160
"WATCHTOWER_NO_STARTUP_MESSAGE=true",
157161
"WATCHTOWER_CLEANUP=true",
158162
"WATCHTOWER_NOTIFICATION_URL=${WATCHTOWER_NOTIFICATION_URL}"
159163
],
164+
"labels": [
165+
"com.centurylinklabs.watchtower.enable=true"
166+
],
160167
"volumes": ["/var/run/docker.sock:/var/run/docker.sock"],
161168
"restart": "always",
162169
"cpus": "${APP_CPU_LIMIT_MEDIUM}",
@@ -168,12 +175,16 @@
168175
"hostname": "${DEVICE_NAME}_watchtower",
169176
"image": "nickfedor/watchtower:latest",
170177
"environment": [
178+
"WATCHTOWER_LABEL_ENABLE=${M4B_WATCHTOWER_LABELS}",
171179
"WATCHTOWER_POLL_INTERVAL=14400",
172180
"WATCHTOWER_ROLLING_RESTART=false",
173181
"WATCHTOWER_NO_STARTUP_MESSAGE=true",
174182
"WATCHTOWER_CLEANUP=true",
175183
"WATCHTOWER_NOTIFICATION_URL=${WATCHTOWER_NOTIFICATION_URL}"
176184
],
185+
"labels": [
186+
"com.centurylinklabs.watchtower.enable=true"
187+
],
177188
"volumes": ["/var/run/docker.sock:/var/run/docker.sock"],
178189
"restart": "always",
179190
"cpus": "${APP_CPU_LIMIT_MEDIUM}",
@@ -185,6 +196,9 @@
185196
"container_name": "${DEVICE_NAME}_m4b_dashboard",
186197
"hostname": "${DEVICE_NAME}_m4b_dashboard",
187198
"image": "nginx:alpine-slim",
199+
"labels": [
200+
"com.centurylinklabs.watchtower.enable=true"
201+
],
188202
"volumes": [
189203
"./.resources/.www:/usr/share/nginx/html",
190204
"./.resources/.assets:/usr/share/nginx/html/.images:ro",

utils/generator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,11 @@ def generate_env_file(
489489
for key, value in notifications_config.items():
490490
env_lines.append(f"WATCHTOWER_NOTIFICATION_{key.upper()}={value}")
491491

492+
# Add Watchtower label scoping configuration
493+
watchtower_config = m4b_config.get("watchtower", {})
494+
watchtower_labels_enabled = watchtower_config.get("enable_labels", True)
495+
env_lines.append(f"M4B_WATCHTOWER_LABELS={'true' if watchtower_labels_enabled else 'false'}")
496+
492497
# Add app-specific configurations only if the app is enabled
493498
apps_categories = ["apps"]
494499
if is_main_instance:

0 commit comments

Comments
 (0)