abiosoft / caddy-docker

Docker container for Caddy
https://hub.docker.com/r/abiosoft/caddy/
MIT License
768 stars 315 forks source link

Telemetry not being disabled properly #111

Closed enriquecaballero closed 6 years ago

enriquecaballero commented 6 years ago

Just pulled and added the telemetry: false arg yet I see...

caddy_1  | 2018/05/10 22:18:44 [INFO] Sending telemetry: success

...in my logs.

abiosoft commented 6 years ago

use the ENABLE_TELEMETRY env var instead.

https://github.com/abiosoft/caddy-docker#telemetry-stats

enriquecaballero commented 6 years ago

There seems to be a disconnect here. Shouldn't https://github.com/abiosoft/caddy-docker/blob/master/Dockerfile#L8 match https://github.com/abiosoft/caddy-docker/blob/master/Dockerfile#L28?

abiosoft commented 6 years ago

Nope, not at all. They are two different things.

The first one generates a configurable caddy, the second one simply defaults the env var to enabled.

enriquecaballero commented 6 years ago

OH! Gotcha. Cool. I'll wait until the builds are done. Thanks!

abiosoft commented 6 years ago

It should be fine now.

abiosoft commented 6 years ago

@enriquecaballero this decision has been reversed after careful discussion with Caddy team members due to the relevance of the build time config to the Telemetry project.

However, the option to opt out still remains but it is now provided via a separate tag. https://github.com/abiosoft/caddy-docker#telemetry-stats

enriquecaballero commented 6 years ago

So just pass 0.11.0-no-stats to the version arg?

abiosoft commented 6 years ago

So just pass 0.11.0-no-stats to the version arg?

Yeah. Unfortunately, like yesterday the builds are still ongoing. The tag may not be live for the next one hour. But abiosoft/caddy:no-stats is already live which is the equivalent of :latest.

enriquecaballero commented 6 years ago

This doesn't work for me:

version: "3"
services:
  caddy:
    build:
      context: github.com/abiosoft/caddy-docker.git
      args:
        version: "0.11.0-no-stats"
        plugins: cloudflare
    restart: always
    network_mode: "host"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "./Caddyfile:/etc/Caddyfile"
      - "./.caddy:/root/.caddy"

This used to work for me:

version: "3"
services:
  caddy:
    build:
      context: github.com/abiosoft/caddy-docker.git
      args:
        version: "0.11.0"
        plugins: cloudflare
    restart: always
    environment:
      - ENABLE_TELEMETRY=false
    network_mode: "host"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "./Caddyfile:/etc/Caddyfile"
      - "./.caddy:/root/.caddy"
abiosoft commented 6 years ago

Specify version as 0.11.0 and dockerfile as Dockerfile-no-stats