question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Cannot disable registration

See original GitHub issue

Describe the bug Cannot disable registration using the .env file

Product Flavor

To Reproduce

  1. Disable new signups using .env file
  2. Run Docker

Expected behavior I expected not to be able to make new users.

Desktop (please complete the following information):

  • OS: Safari
  • Browser: Safari
  • Version: 15.4

Additional context My docker-compose.yml:

version: '3'

services:
  postgres:
    image: postgres:latest
    container_name: reactive-resume-postgres
    ports:
      - 5432:5432
    env_file: .env
    volumes:
      - ./config:/var/lib/postgresql/data

  traefik:
    image: traefik:latest
    container_name: reactive-resume-traefik
    command:
      - --providers.docker=true
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
    ports:
      - 8281:80
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro

  server:
    image: amruthpillai/reactive-resume:server-latest
    container_name: reactive-resume-server
    env_file: .env
    environment:
      - POSTGRES_HOST=postgres
    depends_on:
      - traefik
      - postgres
    labels:
      - traefik.enable=true
      - traefik.http.routers.server.entrypoints=web
      - traefik.http.routers.server.rule=Host(`REMOVED `) && PathPrefix(`/api/`)
      - traefik.http.routers.server.middlewares=server-stripprefix
      - traefik.http.middlewares.server-stripprefix.stripprefix.prefixes=/api
      - traefik.http.middlewares.server-stripprefix.stripprefix.forceslash=true

  client:
    image: amruthpillai/reactive-resume:client-latest
    container_name: reactive-resume-client
    env_file: .env
    depends_on:
      - traefik
      - server
    labels:
      - traefik.enable=true
      - traefik.http.routers.client.rule=Host(`REMOVED`)
      - traefik.http.routers.client.entrypoints=web

My .env file:

# App
TZ=America/New_York
SECRET_KEY=REMOVED
# URLs
PUBLIC_URL= REMOVED
PUBLIC_SERVER_URL=REMOVED

# Database
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USERNAME=postgres
POSTGRES_PASSWORD=REMOVED
POSTGRES_DATABASE=postgres

# Auth
JWT_SECRET=REMOVED
JWT_EXPIRY_TIME=604800

# Flags (Optional)
PUBLIC_FLAG_DISABLE_SIGNUPS=true

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
AzamServercommented, Mar 22, 2022

I deleted the containers multiple times and even removed the docker volume for the Postgres database. None of that resolved the issue.

0reactions
modem7commented, Mar 29, 2022

This is my current setup, and it’s working with the registration disable:

 ###################
 ##Reactive Resume##
 ###################

  reactiveresumeserver:
    image: amruthpillai/reactive-resume:server-latest
    container_name: ReactiveResume-Server
    environment:
      - PUBLIC_URL=https://resume.$DOMAINNAME
      - POSTGRES_HOST=reactiveresumedb
      - POSTGRES_DATABASE=$RR_POSTGRES_DATABASE
      - POSTGRES_PASSWORD=$RR_POSTGRES_PASSWORD
      - POSTGRES_USER=$RR_POSTGRES_USERNAME
      - TZ=$TZ
      - SECRET_KEY=$RR_SECRET_KEY
      - JWT_SECRET=$RR_JWT_SECRET
      - JWT_EXPIRY_TIME=$RR_JWT_EXPIRY_TIME
      - PUBLIC_GOOGLE_CLIENT_ID=$RR_PUBLIC_GOOGLE_CLIENT_ID
      - GOOGLE_CLIENT_SECRET=$RR_GOOGLE_CLIENT_SECRET
      - GOOGLE_API_KEY=$RR_GOOGLE_API_KEY
    depends_on:
      - reactiveresumedb
    networks:
      pihole:
        ipv4_address: '172.22.0.140'
      isolated:
    labels: 
      - autoheal=true
      - "traefik.enable=true"
      ## HTTP Routers
      - "traefik.http.routers.resumeserver-rtr.entrypoints=https"
      - "traefik.http.routers.resumeserver-rtr.rule=Host(`resume.$DOMAINNAME`) && PathPrefix(`/api/`)"
      - "traefik.http.routers.resumeserver-rtr.tls=true"
      ## Middlewares
      - "traefik.http.routers.resumeserver-rtr.middlewares=chain-no-auth@file, resume-api" # No Authentication
      # - "traefik.http.routers.resumeserver-rtr.middlewares=chain-basic-auth@file" # Basic Authentication
      # - "traefik.http.routers.resumeserver-rtr.middlewares=chain-oauth@file" # Google OAuth 2.0
      # - "traefik.http.routers.resumeserver-rtr.middlewares=chain-authelia@file" # Authelia
      - "traefik.http.middlewares.resume-api.stripprefix.prefixes=/api"
      - "traefik.http.middlewares.resume-api.stripprefix.forceslash=true"
      ## HTTP Services
      - "traefik.http.routers.resumeserver-rtr.service=resumeserver-svc"
      - "traefik.http.services.resumeserver-svc.loadbalancer.server.port=3100"
    volumes:
      - $USERDIR/ReactiveResume/uploads:/app/server/dist/assets/uploads
    healthcheck:
      test: curl -fSs http://localhost:3100/health || exit 1
      interval: 30s
      timeout: 5s
      retries: 3
    restart: always

  reactiveresumeclient:
    image: amruthpillai/reactive-resume:client-latest
    container_name: ReactiveResume-Client
    environment:
      - PUBLIC_SERVER_URL=https://resumeserver.$DOMAINNAME
      - TZ=$TZ
      # - SECRET_KEY=$RR_SECRET_KEY
      # - JWT_SECRET=$RR_JWT_SECRET
      # - JWT_EXPIRY_TIME=$RR_JWT_EXPIRY_TIME
      - PUBLIC_GOOGLE_CLIENT_ID=$RR_PUBLIC_GOOGLE_CLIENT_ID
      - GOOGLE_CLIENT_SECRET=$RR_GOOGLE_CLIENT_SECRET
      - GOOGLE_API_KEY=$RR_GOOGLE_API_KEY
      - PUBLIC_FLAG_DISABLE_SIGNUPS=true
    depends_on:
      - reactiveresumeserver
      - reactiveresumedb
    networks:
      pihole:
        ipv4_address: '172.22.0.141'
    labels: 
      - autoheal=true
      - "traefik.enable=true"
      ## HTTP Routers
      - "traefik.http.routers.resume-rtr.entrypoints=https"
      - "traefik.http.routers.resume-rtr.rule=Host(`resume.$DOMAINNAME`)"
      - "traefik.http.routers.resume-rtr.tls=true"
      ## Middlewares
      - "traefik.http.routers.resume-rtr.middlewares=chain-no-auth@file" # No Authentication
      # - "traefik.http.routers.resume-rtr.middlewares=chain-basic-auth@file" # Basic Authentication
      # - "traefik.http.routers.resume-rtr.middlewares=chain-oauth@file" # Google OAuth 2.0
      # - "traefik.http.routers.resume-rtr.middlewares=chain-authelia@file" # Authelia
      ## HTTP Services
      - "traefik.http.routers.resume-rtr.service=resume-svc"
      - "traefik.http.services.resume-svc.loadbalancer.server.port=3000"
      ## Flame Dashboard
      - flame.type=application # "app" works too
      - flame.name=Reactive Resume
      - flame.icon=https://raw.githubusercontent.com/modem7/MiscAssets/master/Icons/rxresume.png
    healthcheck:
      test: curl -fSs 127.0.0.1:3000 || exit 1
      interval: 30s
      timeout: 5s
      retries: 3
    restart: always

  reactiveresumedb:
    image: postgres:alpine
    container_name: ReactiveResume-DB
    environment:
      - TZ=$TZ
      - POSTGRES_DB=$RR_POSTGRES_DATABASE
      - POSTGRES_PASSWORD=$RR_POSTGRES_PASSWORD
      - POSTGRES_USER=$RR_POSTGRES_USERNAME
    networks:
      - isolated
    volumes:
      - $USERDIR/ReactiveResume/db:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $RR_POSTGRES_USERNAME" ]
      interval: 30s
      timeout: 5s
      retries: 3
    restart: always
Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug: Disable self registration option not working #2839 - GitHub
Server Setup Information: Wekan version: 3.56 Operating System: Ubuntu 16.04 Deployment Method: bundle/source Http frontend: none Node ...
Read more >
Cannot disable registration - WordPress.org
Hi there, It looks like it is not possible to disable registration in Ultimate Member plugin version 2.4.2, even though wp-admin>Settings>General>”Anyone ...
Read more >
Disabling Allow New Registrations still shows registration link ...
I noticed that if I uncheck allow new registrations the 'Sign Up' link is still visible in the header. Furthermore, the link opens...
Read more >
how to disable registration? - phpBB
In phpBB2, if you go to the admin panel and choose 'Disallow names' at the bottom of the admin menu you can stop...
Read more >
How to disable user signup? - Cloudron Forum
@darcyc Turning off sign ups works for me here. I think the bug is that the "register" link is still shown in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found