Switch Docker and Nginx container port to uncommon high port 28473

This commit is contained in:
FaroeGames committed 2026-11-17 15:23:09 -07:00
1 parent f86f5d8bef
commit 84b08f0cdb
5 files changed
+11 -9

No files matched your search

+2 -2
View File
@@ -9,7 +9,7 @@ COPY oras/src/ /usr/share/nginx/html/oras/src/
COPY luminescent-platinum/index.html /usr/share/nginx/html/luminescent-platinum/index.html COPY luminescent-platinum/index.html /usr/share/nginx/html/luminescent-platinum/index.html
COPY luminescent-platinum/src/ /usr/share/nginx/html/luminescent-platinum/src/ COPY luminescent-platinum/src/ /usr/share/nginx/html/luminescent-platinum/src/
EXPOSE 80 EXPOSE 28473
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget -q -O /dev/null http://127.0.0.1/health || exit 1 CMD wget -q -O /dev/null http://127.0.0.1:28473/health || exit 1
+4 -4
View File
@@ -37,7 +37,7 @@ git push -u origin main
## Hosting in a Standalone Docker Container on Unraid ## Hosting in a Standalone Docker Container on Unraid
The repository includes a lightweight `nginx:1.27-alpine` [Dockerfile](./Dockerfile), [docker/nginx.conf](./docker/nginx.conf), and [docker-compose.yml](./docker-compose.yml) configured cleanly for reverse proxies (`absolute_redirect off`, `.mjs`/`.webp` MIME types, trailing-slash redirects, `/health` probe, port `80` inside the container). The repository includes a lightweight `nginx:1.27-alpine` [Dockerfile](./Dockerfile), [docker/nginx.conf](./docker/nginx.conf), and [docker-compose.yml](./docker-compose.yml) configured cleanly for reverse proxies (`absolute_redirect off`, `.mjs`/`.webp` MIME types, trailing-slash redirects, `/health` probe, running on uncommon high port `28473`).
### Option A — Build Directly on Unraid (`docker compose`) ### Option A — Build Directly on Unraid (`docker compose`)
@@ -59,9 +59,9 @@ docker compose up -d --build
### Option B — Reverse Proxy / Subdomain Setup (Nginx Proxy Manager / SWAG) ### Option B — Reverse Proxy / Subdomain Setup (Nginx Proxy Manager / SWAG)
- **Default Compose port:** `8088` on Unraid → container port `80` - **Default Compose port:** `28473` on Unraid → container port `28473` (avoids `80`, `443`, `8080`, `8088`)
- **Nginx Proxy Manager / SWAG target:** - **Nginx Proxy Manager / SWAG target:**
- Scheme: `http` - Scheme: `http` (Nginx Proxy Manager handles HTTPS/SSL termination for your subdomain)
- Forward Hostname / IP: your Unraid IP (or `professor-oak-tracker` if both containers share a custom Docker bridge network like `proxynet`) - Forward Hostname / IP: your Unraid IP (or `professor-oak-tracker` if both containers share a custom Docker bridge network like `proxynet`)
- Forward Port: `8088` (if using host port mapping) or `80` (if sharing a Docker network) - Forward Port: `28473`
- Enable Websockets: not required, standard HTTPS/SSL termination works out of the box (for example, `https://oak.trevorstocks.ca/`) - Enable Websockets: not required, standard HTTPS/SSL termination works out of the box (for example, `https://oak.trevorstocks.ca/`)
+2 -2
View File
@@ -6,9 +6,9 @@ services:
container_name: professor-oak-tracker container_name: professor-oak-tracker
restart: unless-stopped restart: unless-stopped
ports: ports:
- "8088:80" - "28473:28473"
# Optional: if your Nginx Proxy Manager / SWAG runs on a shared Docker network (e.g., proxynet), # Optional: if your Nginx Proxy Manager / SWAG runs on a shared Docker network (e.g., proxynet),
# uncomment below and point the proxy host to http://professor-oak-tracker:80 # you can remove `ports:` above, uncomment below, and point the proxy host to http://professor-oak-tracker:28473
# networks: # networks:
# - proxynet # - proxynet
+1 -1
View File
@@ -1,5 +1,5 @@
server { server {
listen 80; listen 28473;
server_name _; server_name _;
root /usr/share/nginx/html; root /usr/share/nginx/html;
+2
View File
@@ -163,6 +163,8 @@ test('Both trackers expose a relative Hub navigation link and valid Docker/Nginx
} }
const nginxConf = await fs.readFile(path.join(ROOT_DIR, 'docker/nginx.conf'), 'utf8'); const nginxConf = await fs.readFile(path.join(ROOT_DIR, 'docker/nginx.conf'), 'utf8');
assert.ok(dockerfile.includes('EXPOSE 28473'));
assert.ok(nginxConf.includes('listen 28473;'));
assert.ok(nginxConf.includes('absolute_redirect off;')); assert.ok(nginxConf.includes('absolute_redirect off;'));
assert.ok(nginxConf.includes('application/javascript mjs;')); assert.ok(nginxConf.includes('application/javascript mjs;'));
assert.ok(nginxConf.includes('location = /oras')); assert.ok(nginxConf.includes('location = /oras'));