diff --git a/Dockerfile b/Dockerfile index 287e22c..54e37dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/src/ /usr/share/nginx/html/luminescent-platinum/src/ -EXPOSE 80 +EXPOSE 28473 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 diff --git a/README.md b/README.md index 5c0db3b..8adb437 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ git push -u origin main ## 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`) @@ -59,9 +59,9 @@ docker compose up -d --build ### 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:** - - 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 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/`) diff --git a/docker-compose.yml b/docker-compose.yml index fc7cb13..89e3876 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,9 +6,9 @@ services: container_name: professor-oak-tracker restart: unless-stopped ports: - - "8088:80" + - "28473:28473" # 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: # - proxynet diff --git a/docker/nginx.conf b/docker/nginx.conf index 5b4b1f5..0a3db78 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -1,5 +1,5 @@ server { - listen 80; + listen 28473; server_name _; root /usr/share/nginx/html; diff --git a/tests/portal.test.mjs b/tests/portal.test.mjs index 2a8dc17..2ad08b3 100644 --- a/tests/portal.test.mjs +++ b/tests/portal.test.mjs @@ -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'); + assert.ok(dockerfile.includes('EXPOSE 28473')); + assert.ok(nginxConf.includes('listen 28473;')); assert.ok(nginxConf.includes('absolute_redirect off;')); assert.ok(nginxConf.includes('application/javascript mjs;')); assert.ok(nginxConf.includes('location = /oras'));