Skip to content

[Bug]: Disabling analytics via env vars in docker doesn't work #52

@smandon

Description

@smandon

Bug Type

Other

Expected output, actual output, steps to recreate

Expected: When running a self-hosted instance via docker with env vars set to NTB_ANALYTICS_DSN=false NTB_ANALYTICS_DOMAIN=false, there shouldn't be requests to as93.net

Actual: There is still a request performed for https://no-track.as93.net/js/script.js

Steps: Install the latest version via docker compose with environment vars NTB_ANALYTICS_DSN=false NTB_ANALYTICS_DOMAIN=false, open a browser, open devtools network panel, browse to the docker instance and watch that requests to as93.net are made

Additional Info

Image

I can confirm via the settings export page that the env vars are both recognized and set to false.

Image

My compose file:

services:
  networking-toolbox:
    image: lissy93/networking-toolbox:latest
    container_name: networking-toolbox
    restart: unless-stopped
    environment:
      - NODE_ENV=production
      - PORT=3000
      - HOST=0.0.0.0
      - NTB_ANALYTICS_DSN=false
      - NTB_ANALYTICS_DOMAIN=false
    ports:
      - 8098:3000
    healthcheck:
      test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s```

### Checklist

- [x] I have searched existing issues to make sure this bug hasn't been reported before
- [x] I agree to follow the [Code of Conduct](https://github.com/Lissy93/networking-toolbox/?tab=coc-ov-file#contributor-covenant-code-of-conduct)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions