diff --git a/Dockerfile b/Dockerfile index 05768a9..29a1f96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,6 +48,7 @@ RUN \ ENV TFTPD_OPTS='' ENV NGINX_PORT='80' +ENV WEB_APP_PORT='3000' EXPOSE 3000 diff --git a/README.md b/README.md index d287625..b330ca5 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,8 @@ docker run -d \ --name=netbootxyz \ -e MENU_VERSION=2.0.76 `# optional` \ -e NGINX_PORT=80 `# optional` \ - -p 3000:3000 `# sets webapp port` \ + -e WEB_APP_PORT=3000 `# optional` \ + -p 3000:3000 `# sets web configuration interface port, destination should match ${WEB_APP_PORT} variable above.` \ -p 69:69/udp `# sets tftp port` \ -p 8080:80 `# optional, destination should match ${NGINX_PORT} variable above.` \ -v /local/path/to/config:/config `# optional` \ @@ -112,6 +113,7 @@ Container images are configured using parameters passed at runtime (such as thos | `-p 3000` | Web configuration interface. | | `-p 69/udp` | TFTP Port. | | `-p 80` | NGINX server for hosting assets. | +| `-e WEB_APP_PORT=3000` | Specify a different port for the web configuration interface to listen on. | | `-e NGINX_PORT=80` | Specify a different port for NGINX service to listen on. | | `-e MENU_VERSION=2.0.76` | Specify a specific version of boot files you want to use from netboot.xyz (unset pulls latest) | | `-v /config` | Storage for boot menu files and web application config | diff --git a/docker-compose.yml.example b/docker-compose.yml.example index 3ff48f8..d67dd0f 100644 --- a/docker-compose.yml.example +++ b/docker-compose.yml.example @@ -7,11 +7,12 @@ services: environment: - MENU_VERSION=2.0.47 # optional - NGINX_PORT=80 # optional + - WEB_APP_PORT=3000 # optional volumes: - /path/to/config:/config # optional - /path/to/assets:/assets # optional ports: - - 3000:3000 + - 3000:3000 # optional, destination should match ${WEB_APP_PORT} variable above. - 69:69/udp - - 8080:80 # optional, destination should match ${NGINX_PORT} variable above. + - 8080:80 # optional, destination should match ${NGINX_PORT} variable above. restart: unless-stopped diff --git a/root/etc/supervisor.conf b/root/etc/supervisor.conf index 986420e..ee56be2 100644 --- a/root/etc/supervisor.conf +++ b/root/etc/supervisor.conf @@ -15,7 +15,7 @@ daemon=off priority = 2 [program:webapp] -environment=NODE_ENV="production",PORT=3000 +environment=NODE_ENV="production",PORT=%(ENV_WEB_APP_PORT)s command=/usr/bin/node app.js user=nbxyz directory=/app