Skip to content

Add environment variable to set BASE_PATH in configuration.py  #7

@xanmanning

Description

@xanmanning

linuxserver.io


Desired Behavior

Setting the environment variable BASE_PATH sets the BASE_PATH variable in configuration.py

Used in docker-compose file like below:

---
version: "2.1"
services:
  netbox:
    image: ghcr.io/linuxserver/netbox
    container_name: netbox
    environment:
      - PUID=1000
      - PGID=1000
      - SUPERUSER_EMAIL=<SUPERUSER_EMAIL>
      - SUPERUSER_PASSWORD=<SUPERUSER_PASSWORD>
      - ALLOWED_HOST=<ALLOWED_HOST>
      - BASE_PATH=<BASE_PATH>
      - DB_NAME=<DB_NAME>
      - DB_USER=<DB_USER>
      - DB_PASSWORD=<DB_PASSWORD>
      - DB_HOST=<DB_HOST>
      - DB_PORT=<DB_PORT>
      - REDIS_HOST=<REDIS_HOST>
      - REDIS_PORT=<REDIS_PORT>
      - REDIS_PASSWORD=<REDIS_PASSWORD>
      - TZ=<TZ>
    volumes:
      - <path to data on host>:/config
    ports:
      - 8000:8000
    restart: unless-stopped

Current Behavior

This is available, so you aren't able to host Netbox as https://yourdomain.com/netbox/

Alternatives Considered

Attempted to modify ingress controller in K8s, can't seem to get it to rewrite correctly, causes issues when loading.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions