Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] NGINX_PORT Variable doesn't work #66

Closed
1 task done
swooshant opened this issue Apr 30, 2024 · 3 comments
Closed
1 task done

[BUG] NGINX_PORT Variable doesn't work #66

swooshant opened this issue Apr 30, 2024 · 3 comments

Comments

@swooshant
Copy link

swooshant commented Apr 30, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When setting the NGINX_PORT environment variable, it does not change. It still uses port 80 and the variable doesn't do anything.

Expected Behavior

When changing the NGINX_PORT environment variable, I expect the internal server to begin listening on the specified port. However, it only continues to listen to port 80 as seen in the logs and in ability for me to connect to the new port.

Steps To Reproduce

Using docker compose provided below, pass the NGINX_PORT variable as an environment variable. Check the logs and you'll see it defaults to listening to 127.0.0.1:80 no matter what you change it to.

Environment

- OS: Ubuntu 24.04
- How docker service was installed:
distro's packagemanager

CPU architecture

x86-64

Docker creation

Docker Compose File:

services:
  netbootxyz:
    image: lscr.io/linuxserver/netbootxyz:0.7.1-ls160
    container_name: netbootxyz.${HOST}
      #network_mode: host
    environment:
      - NGINX_PORT=9080 #Doesn't work
      - WEB_APP_PORT=3000
      - PUID=1000
      - PGID=1000
      - PORT_RANGE=30000:30010 #optional
      # - MENU_VERSION=2.0.47 # optional, sets menus version, unset uses latest
    volumes:
      - ./config:/config
      - ./assets:/assets
    #Couldn't get it to work with the vip ${VHOSTIP}
    ports:
      - ${HOSTIP}:3000:3000
      - ${HOSTIP}:69:69/udp
      - ${HOSTIP}:9080:80
      - ${HOSTIP}:30000-30010:30000-30010/udp
    restart: unless-stopped
  dhcp-proxy:
    image: dockurr/dnsmasq:latest
    container_name: dhcp-proxy.${HOST}
    network_mode: host
    cap_add:
      - NET_ADMIN
    volumes:
      - ./dhcp-proxy/dnsmasq.conf:/etc/dnsmasq.conf:ro # optional
    #Couldn't get this to work without network_mode:host
    #ports:
    # - ${HOSTIP}:67:67/udp
    # - ${HOSTIP}:68:68/udp
    # - ${HOSTIP}:4011:4011
    restart: unless-stopped

Container logs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

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

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

To support the app dev(s) visit:
netboot.xyz: https://opencollective.com/netbootxyz/donate

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

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

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

[custom-init] No custom files found, skipping...
Connection to localhost (127.0.0.1) 80 port [tcp/http] succeeded!
listening on *:3000
Connection to localhost (::1) 3000 port [tcp/*] succeeded!
Connection to localhost (::1) 69 port [udp/tftp] succeeded!
[ls.io-init] done.
StOdKMKIZte24_-xAAAB connected time=1714486460087
Copy link

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

@Roxedus
Copy link
Member

Roxedus commented Apr 30, 2024

The variable is only used on first run, the file is then written to /config for persistent storage

@swooshant
Copy link
Author

The variable is only used on first run, the file is then written to /config for persistent storage

Ah that makes sense, I will close out this issue then. Didn't realize it was doing that.

@swooshant swooshant closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants