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

add new port settings for webapp and asset server #64

Merged
merged 1 commit into from
Feb 25, 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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ services:
- MENU_VERSION=1.9.9 #optional
- PORT_RANGE=30000:30010 #optional
- SUBFOLDER=/ #optional
- NGINX_PORT=80 #optional
- WEB_APP_PORT=3000 #optional
volumes:
- /path/to/config:/config
- /path/to/assets:/assets #optional
Expand All @@ -193,6 +195,8 @@ docker run -d \
-e MENU_VERSION=1.9.9 `#optional` \
-e PORT_RANGE=30000:30010 `#optional` \
-e SUBFOLDER=/ `#optional` \
-e NGINX_PORT=80 `#optional` \
-e WEB_APP_PORT=3000 `#optional` \
-p 3000:3000 \
-p 69:69/udp \
-p 8080:80 `#optional` \
Expand All @@ -217,6 +221,8 @@ Containers are configured using parameters passed at runtime (such as those abov
| `-e MENU_VERSION=1.9.9` | Specify a specific version of boot files you want to use from NETBOOT.XYZ (unset pulls latest) |
| `-e PORT_RANGE=30000:30010` | Specify the port range tftp will use for data transfers [(see Wikipedia)](https://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol#Details) |
| `-e SUBFOLDER=/` | Specify a sobfolder if running this behind a reverse proxy (IE /proxy/) |
| `-e NGINX_PORT=80` | Specify a different internal port for the asset server |
| `-e WEB_APP_PORT=3000` | Specify a different internal port for the configuration UI |
| `-v /config` | Storage for boot menu files and web application config |
| `-v /assets` | Storage for NETBOOT.XYZ bootable assets (live CDs and other files) |

Expand Down Expand Up @@ -381,6 +387,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **24.02.24:** - Add new port settings for the webserver and app.
* **08.12.23:** - Rebase to Alpine 3.19.
* **17.11.23:** - Rebase to Alpine 3.18.
* **01.07.23:** - Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)
Expand Down
3 changes: 3 additions & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ opt_param_env_vars:
- {env_var: "MENU_VERSION", env_value: "1.9.9", desc: "Specify a specific version of boot files you want to use from NETBOOT.XYZ (unset pulls latest)"}
- {env_var: "PORT_RANGE", env_value: "30000:30010", desc: "Specify the port range tftp will use for data transfers [(see Wikipedia)](https://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol#Details)"}
- {env_var: "SUBFOLDER", env_value: "/", desc: "Specify a sobfolder if running this behind a reverse proxy (IE /proxy/)"}
- {env_var: "NGINX_PORT", env_value: "80", desc: "Specify a different internal port for the asset server"}
- {env_var: "WEB_APP_PORT", env_value: "3000", desc: "Specify a different internal port for the configuration UI"}
opt_param_usage_include_ports: true
opt_param_ports:
- {external_port: "8080", internal_port: "80", port_desc: "NGINX server for hosting assets."}
Expand Down Expand Up @@ -128,6 +130,7 @@ app_setup_block: |

# changelog
changelogs:
- {date: "24.02.24:", desc: "Add new port settings for the webserver and app."}
- {date: "08.12.23:", desc: "Rebase to Alpine 3.19."}
- {date: "17.11.23:", desc: "Rebase to Alpine 3.18."}
- {date: "01.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"}
Expand Down
2 changes: 1 addition & 1 deletion root/defaults/default
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen 80;
listen REPLACE_PORT;
location / {
root /assets;
autoindex on;
Expand Down
4 changes: 4 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/init-nginx-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ if [[ ! -f /config/nginx/nginx.conf ]]; then
fi

if [[ ! -f /config/nginx/site-confs/default ]]; then
if [ -z ${NGINX_PORT+x} ]; then
NGINX_PORT=80
fi
sed -i "s/REPLACE_PORT/$NGINX_PORT/g" /defaults/default
cp /defaults/default /config/nginx/site-confs/default
fi

Expand Down