tale / headplane

An advanced UI for juanfont/headscale
MIT License
73 stars 2 forks source link

Update ACL do not send SIGHUP signal to headscale container #16

Open gawsoftpl opened 1 month ago

gawsoftpl commented 1 month ago

When I update acl config in headplane editor, file are saved, but headplane do not send signal SIGHUP to headscale container

  headscale:
    image: ghcr.io/juanfont/headscale:sha-c8ebbed-debug@sha256:46683f33ebdcc3e61c7966bc7299d267c9f850318ebe0b44864cc0d2ce2163ac
    container_name: 'headscale'
    restart: 'unless-stopped'
    command: 'serve'
    volumes:
      - './data:/var/lib/headscale'
      - './configs:/etc/headscale'
    ports:
      - '8080:8080'
  headplane:
    container_name: headplane
    image: ghcr.io/tale/headplane:0.1.6@sha256:0a72d17a548b4b8dc7d4f81e35ee0d1f5c34261f5ec079f06df308d1c74eee86
    restart: unless-stopped
    volumes:
      - './data:/var/lib/headscale'
      - './configs:/etc/headscale'
      - '/var/run/docker.sock:/var/run/docker.sock'
    ports:
      - '3000:3000'
    environment:
      # This is always required for Headplane to work
      #HEADSCALE_URL: 'http://headscale:8080'
      COOKIE_SECRET: 'abcdefghijklmnopqrstuvwxyz'

      HEADSCALE_INTEGRATION: 'docker'
      HEADSCALE_CONTAINER: 'headscale'

      DISABLE_API_KEY_LOGIN: 'true'
      HOST: '0.0.0.0'
      PORT: '3000'
tale commented 1 month ago

Do you have any docker logs or logs of Headplane 0.1.7?

xkvnn commented 3 weeks ago

Same here. The headplane only echo API log. Nothing else.

headplane  | PATCH /admin/acls?index=&_data=routes%2F_data.acls._index 200 - - 26.540 ms
headplane  | GET /admin/acls?_data=routes%2F_data.acls._index 200 - - 21.351 ms
headplane  | GET /admin/acls?_data=routes%2F_data 200 - - 129.300 ms
tale commented 3 weeks ago

Which version and which integration?

xkvnn commented 3 weeks ago

This is the compose file that I used. Both headscale and headplane are the latest versions.

services:
  headscale:
    container_name: headscale
    image: headscale/headscale:0.23.0-alpha12
    restart: always
    volumes:
      - ./config-headscale:/etc/headscale
      - ./data-headscale:/var/lib/headscale
    entrypoint: headscale serve

  caddy:
    image: caddy:latest
    container_name: caddy
    restart: always
    stdin_open: true
    tty: true
    volumes:
      - ./data-caddy:/data
      - ./config-caddy:/config
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 80:80
      - 443:443
    entrypoint: /usr/bin/caddy run --adapter caddyfile --config /config/Caddyfile

  headplane:
    container_name: headplane
    image: ghcr.io/tale/headplane:latest
    restart: always
    volumes:
      - ./config-headscale:/etc/headscale
      - ./data-headscale:/var/lib/headscale
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      HEADSCALE_URL: http://headscale:8080
      COOKIE_SECRET: abcdefghijklmnopqrstuvwxyz

      DISABLE_API_KEY_LOGIN: true

      CONFIG_FILE: /etc/headscale/config.yaml
      ACL_FILE: /etc/headscale/acl_policy.hujson

      HEADSCALE_INTEGRATION: docker
      HEADSCALE_CONTAINER: headscale
tale commented 2 weeks ago

Let me see if I can reproduce and I'll get back to you on that.