truenas / apps

GNU Lesser General Public License v3.0
79 stars 26 forks source link

Unnecessary network traffic from actual-budget health check #957

Closed odoublewen closed 6 days ago

odoublewen commented 1 week ago

The docker-compose.yaml template for the actual-budget app includes a healthcheck here:

    {% set test = "NODE_TLS_REJECT_UNAUTHORIZED=0 npm run health-check" %}
    healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }}

This is fine, but as a side effect of the health check, npm is trying to update itself, every 10 seconds, which generates unnecessary and confusing network activity. In the attached screenshot, you can see the incoming traffic, every 10 seconds, which stops when I turned off the TrueNAS app for actual-budget, at about the 13:30 mark:

Screenshot 2024-11-18 at 1 38 40 PM

As discussed in this TrueNAS forums post, an simple fix is to set NPM_CONFIG_UPDATE_NOTIFIER=false in the container. I've already done this via the "Additional Environment Variables" config, but it seems like it could be just added to the test definition line (linked at the top of this issue) so users don't have to do this themselves.

stavros-k commented 1 week ago

Of course npm would do that -.-

Thanks!