linuxserver / docker-netbox

GNU General Public License v3.0
79 stars 17 forks source link

README Update: Parameters with defaults should be optional #57

Open Enlinks opened 1 month ago

Enlinks commented 1 month ago

Is there an existing issue for this?

Current Behavior

This could be opinionated but at least based off the root/etc/s6-overlay/s6-rc.d/init-netbox-config/run file, it looks like we're already populating parameters with default values making us refill the same parameters redundant.

Example:

NETBOX_CONF[REDIS_PASSWORD]=${REDIS_PASSWORD:-}
NETBOX_CONF[REDIS_DB_TASK]=${REDIS_DB_TASK:-0}
NETBOX_CONF[REDIS_DB_CACHE]=${REDIS_DB_CACHE:-1}

As it currently stands all these parameters (even with the same default values) are required.

Expected Behavior

Based off the above, these parameters should be considered optional, at least the parameters with a valid default value.

IE ALLOWED_HOST would still be required as it's default value isn't usable:

NETBOX_CONF[ALLOWED_HOST]=${ALLOWED_HOST:-netbox.example.com}

If nothing else, if this is more of an opinionated stance, REDIS_PASSWORD at a minimal should be removed from this requirement since by default Redis does not use a password.

Steps To Reproduce

In README.

Environment

- OS: Unraid
- How docker service was installed: Via Template

CPU architecture

x86-64

Docker creation

docker run
  -d
  --name='netbox'
  --net='internet'
  -e TZ="UTC"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="#####"
  -e HOST_CONTAINERNAME="netbox"
  -e 'SUPERUSER_EMAIL'='#####'
  -e 'SUPERUSER_PASSWORD'='#####'
  -e 'ALLOWED_HOST'='#####'
  -e 'DB_NAME'='netbox'
  -e 'DB_USER'='netbox'
  -e 'DB_PASSWORD'='#####'
  -e 'DB_HOST'='postgresql15-netbox'
  -e 'DB_PORT'='5432'
  -e 'REDIS_HOST'='redis-netbox'
  -e 'REDIS_PORT'='6379'
  -e 'REDIS_PASSWORD'=''
  -e 'REDIS_DB_TASK'=''
  -e 'REDIS_DB_CACHE'=''
  -e 'BASE_PATH'=''
  -e 'REMOTE_AUTH_ENABLED'=''
  -e 'REMOTE_AUTH_BACKEND'=''
  -e 'REMOTE_AUTH_HEADER'=''
  -e 'REMOTE_AUTH_AUTO_CREATE_USER'=''
  -e 'REMOTE_AUTH_DEFAULT_GROUPS'=''
  -e 'REMOTE_AUTH_DEFAULT_PERMISSIONS'=''
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/netbox-logo.png'
  -p '8000:8000/tcp'
  -v '/mnt/user/appdata/netbox':'/config':'rw'
  --memory=4G 'lscr.io/linuxserver/netbox' && docker network connect proxy-net netbox && docker network connect netbox-db-net netbox

Container logs

NA
github-actions[bot] commented 1 month 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 week 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.