linuxserver / docker-healthchecks

GNU General Public License v3.0
177 stars 37 forks source link

[BUG] Cannot close registrations #109

Closed binarypatrick closed 11 months ago

binarypatrick commented 1 year ago

Is there an existing issue for this?

Current Behavior

I have been trying to close registration for my local healthchecks instance. I used the REGISTRATION_OPEN flag and set it to false, but it does not seem to have an effect.

I'll also note I see REGISTRATION_OPEN = False in config/local_settings.py too, but I still see the sign in on the landing page.

image

Expected Behavior

No login available

No response

Steps To Reproduce

Use the YAML above run docker compose up -d --force-recreate navigate to the IP of the host still see the signup

Environment

- OS: Debian GNU/Linux 12 (bookworm)
- How docker service was installed:

sudo apt install docker

CPU architecture

x86-64

Docker creation

version: "3"
services:
  healthchecks:
    image: linuxserver/healthchecks:amd64-latest
    container_name: healthchecks
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - SITE_ROOT=https://health.local
      - SITE_NAME=HealthChecks
      - DEFAULT_FROM_EMAIL
      - EMAIL_HOST=smtp.gmail.com
      - EMAIL_PORT=587
      - EMAIL_HOST_USER
      - EMAIL_HOST_PASSWORD
      - EMAIL_USE_TLS=True
      - SUPERUSER_EMAIL
      - SUPERUSER_PASSWORD
      - DEBUG=False
      - SITE_LOGO_URL=https://pbs.twimg.com/profile_images/1055543716201615365/geMDWaHV_400x400.jpg
      - REGISTRATION_OPEN=False
    volumes:
      - /home/user/healthchecks/config:/config
    ports:
      - 8000:8000
      - 2525:2525
    restart: unless-stopped

### Container logs

```bash
docker logs healthchecks
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

No changes detected
Operations to perform:
  Apply all migrations: accounts, admin, api, auth, contenttypes, payments, sessions
Running migrations:
  No migrations to apply.
Superuser creation skipped. Already exists.
[custom-init] No custom files found, skipping...
[uWSGI] getting INI configuration from uwsgi.ini
[uwsgi-static] added mapping for /static => static-collected
*** Starting uWSGI 2.0.21 (64bit) on [Fri Jul 21 02:22:40 2023] ***
compiled with version: 12.2.1 20220924 on 28 April 2023 21:13:09
os: Linux-6.2.16-4-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.16-5 (2023-07-14T17:53Z)
nodename: 9217676fd78d
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /app/healthchecks
detected binary path: /usr/sbin/uwsgi
your memory page size is 4096 bytes
detected max file descriptor number: 10000
building mime-types dictionary from file /etc/mime.types...1390 entry found
lock engine: pthread robust mutexes
thunder lock: enabled
uwsgi socket 0 bound to TCP address :8000 fd 3
Python version: 3.11.4 (main, Jun  9 2023, 02:29:05) [GCC 12.2.1 20220924]
PEP 405 virtualenv detected: /lsiopy
Set PythonHome to /lsiopy
Python main interpreter initialized at 0x7f05cd3e0638
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 203184 bytes (198 KB) for 1 cores
*** Operational MODE: single process ***
[ls.io-init] done.
WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x7f05cd3e0638 pid: 145 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 145)
spawned uWSGI worker 1 (pid: 169, cores: 1)
[uwsgi-daemons] spawning "python3 ./manage.py sendalerts" (uid: 1000 gid: 1000)
[uwsgi-daemons] spawning "python3 ./manage.py smtpd --port 2525" (uid: 1000 gid: 1000)
[uwsgi-daemons] spawning "python3 ./manage.py sendreports --loop" (uid: 1000 gid: 1000)
Starting SMTP listener on 0.0.0.0:2525 ...
sendalerts is now running
sendreports is now running
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

LinuxServer-CI commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

drizuid commented 11 months ago

A few things 1) why would you NOT see sign-in just because you don't allow registration? 2) I do not see that there is an ENVVAR for - REGISTRATION_OPEN=False, though it is possible it works. The documented method is to modify local_settings.py (you do mention you see it here)

tl;dr it seems registration_open = false is working as expected, unless you are implying that users are still able to register (which is not something you have shown.

that all said, even if registration were still open, we support the container, not the application and you would need to seek help from the upstream dev support. Being this as it is, I will close this as something we will not fix, as it is not our place (and it doesn't seem there is anything to fix to begin with)

github-actions[bot] commented 10 months ago

This issue is locked due to inactivity