Skip to content

Commit de524f8

Browse files
authored
Merge pull request #57 from CompPhy/master
Make web app port configurable.
2 parents 8cb28ab + c4014a0 commit de524f8

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ RUN \
4848

4949
ENV TFTPD_OPTS=''
5050
ENV NGINX_PORT='80'
51+
ENV WEB_APP_PORT='3000'
5152

5253
EXPOSE 69/udp
5354
EXPOSE 80

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ docker run -d \
5858
--name=netbootxyz \
5959
-e MENU_VERSION=2.0.76 `# optional` \
6060
-e NGINX_PORT=80 `# optional` \
61-
-p 3000:3000 `# sets webapp port` \
61+
-e WEB_APP_PORT=3000 `# optional` \
62+
-p 3000:3000 `# sets web configuration interface port, destination should match ${WEB_APP_PORT} variable above.` \
6263
-p 69:69/udp `# sets tftp port` \
6364
-p 8080:80 `# optional, destination should match ${NGINX_PORT} variable above.` \
6465
-v /local/path/to/config:/config `# optional` \
@@ -112,6 +113,7 @@ Container images are configured using parameters passed at runtime (such as thos
112113
| `-p 3000` | Web configuration interface. |
113114
| `-p 69/udp` | TFTP Port. |
114115
| `-p 80` | NGINX server for hosting assets. |
116+
| `-e WEB_APP_PORT=3000` | Specify a different port for the web configuration interface to listen on. |
115117
| `-e NGINX_PORT=80` | Specify a different port for NGINX service to listen on. |
116118
| `-e MENU_VERSION=2.0.76` | Specify a specific version of boot files you want to use from netboot.xyz (unset pulls latest) |
117119
| `-v /config` | Storage for boot menu files and web application config |

docker-compose.yml.example

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ services:
77
environment:
88
- MENU_VERSION=2.0.47 # optional
99
- NGINX_PORT=80 # optional
10+
- WEB_APP_PORT=3000 # optional
1011
volumes:
1112
- /path/to/config:/config # optional
1213
- /path/to/assets:/assets # optional
1314
ports:
14-
- 3000:3000
15+
- 3000:3000 # optional, destination should match ${WEB_APP_PORT} variable above.
1516
- 69:69/udp
16-
- 8080:80 # optional, destination should match ${NGINX_PORT} variable above.
17+
- 8080:80 # optional, destination should match ${NGINX_PORT} variable above.
1718
restart: unless-stopped

root/etc/supervisor.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ daemon=off
1515
priority = 2
1616

1717
[program:webapp]
18-
environment=NODE_ENV="production",PORT=3000
18+
environment=NODE_ENV="production",PORT=%(ENV_WEB_APP_PORT)s
1919
command=/usr/bin/node app.js
2020
user=nbxyz
2121
directory=/app

0 commit comments

Comments
 (0)