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

Make web app port configurable. #57

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ RUN \

ENV TFTPD_OPTS=''
ENV NGINX_PORT='80'
ENV WEB_APP_PORT='3000'

EXPOSE 3000

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` \
Expand Down Expand Up @@ -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 |
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion root/etc/supervisor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down