mirror of
https://github.com/netbootxyz/docker-netbootxyz.git
synced 2025-08-07 14:47:24 +02:00
Make web app port configurable.
This commit is contained in:
parent
2a36c1a8e0
commit
c4014a0a6e
@ -48,6 +48,7 @@ RUN \
|
|||||||
|
|
||||||
ENV TFTPD_OPTS=''
|
ENV TFTPD_OPTS=''
|
||||||
ENV NGINX_PORT='80'
|
ENV NGINX_PORT='80'
|
||||||
|
ENV WEB_APP_PORT='3000'
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
@ -58,7 +58,8 @@ docker run -d \
|
|||||||
--name=netbootxyz \
|
--name=netbootxyz \
|
||||||
-e MENU_VERSION=2.0.76 `# optional` \
|
-e MENU_VERSION=2.0.76 `# optional` \
|
||||||
-e NGINX_PORT=80 `# 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 69:69/udp `# sets tftp port` \
|
||||||
-p 8080:80 `# optional, destination should match ${NGINX_PORT} variable above.` \
|
-p 8080:80 `# optional, destination should match ${NGINX_PORT} variable above.` \
|
||||||
-v /local/path/to/config:/config `# optional` \
|
-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 3000` | Web configuration interface. |
|
||||||
| `-p 69/udp` | TFTP Port. |
|
| `-p 69/udp` | TFTP Port. |
|
||||||
| `-p 80` | NGINX server for hosting assets. |
|
| `-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 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) |
|
| `-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 |
|
| `-v /config` | Storage for boot menu files and web application config |
|
||||||
|
@ -7,11 +7,12 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- MENU_VERSION=2.0.47 # optional
|
- MENU_VERSION=2.0.47 # optional
|
||||||
- NGINX_PORT=80 # optional
|
- NGINX_PORT=80 # optional
|
||||||
|
- WEB_APP_PORT=3000 # optional
|
||||||
volumes:
|
volumes:
|
||||||
- /path/to/config:/config # optional
|
- /path/to/config:/config # optional
|
||||||
- /path/to/assets:/assets # optional
|
- /path/to/assets:/assets # optional
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 3000:3000 # optional, destination should match ${WEB_APP_PORT} variable above.
|
||||||
- 69:69/udp
|
- 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
|
restart: unless-stopped
|
||||||
|
@ -15,7 +15,7 @@ daemon=off
|
|||||||
priority = 2
|
priority = 2
|
||||||
|
|
||||||
[program:webapp]
|
[program:webapp]
|
||||||
environment=NODE_ENV="production",PORT=3000
|
environment=NODE_ENV="production",PORT=%(ENV_WEB_APP_PORT)s
|
||||||
command=/usr/bin/node app.js
|
command=/usr/bin/node app.js
|
||||||
user=nbxyz
|
user=nbxyz
|
||||||
directory=/app
|
directory=/app
|
||||||
|
Loading…
Reference in New Issue
Block a user