refactor: remove PORTAL_HOST from environment variables and update nginx configuration for logging

rabbitprincess committed May 30, 2026 at 00:13 UTC d9f5100e16bb11fc2a6c39815b9c3eba514821eb
5 files changed +7 -5
.env.example
-2
@@ -9,8 +9,6 @@ HTTP_PORT=80
9 HTTPS_PORT=443
10 WIREGUARD_PORT=51820
11 # Relay API and SNI TCP ports are fixed inside the Compose network at 4017 and 443.
12 -# If PORTAL_URL contains a path or a host alias, set PORTAL_HOST to the exact browser-facing host.
13 -PORTAL_HOST=
12 # nginx reads these paths inside its container. Defaults map to ./.portal-certs on the host.
13 NGINX_CERT_FILE=/etc/nginx/certs/fullchain.pem
14 NGINX_CERT_KEY=/etc/nginx/certs/privatekey.pem
docker-compose.yml
+1 -2
@@ -10,7 +10,6 @@ services:
10 - "${HTTPS_PORT:-443}:443"
11 environment:
12 PORTAL_URL: ${PORTAL_URL:-https://localhost}
13 - PORTAL_HOST: ${PORTAL_HOST:-}
13 NGINX_CERT_FILE: ${NGINX_CERT_FILE:-/etc/nginx/certs/fullchain.pem}
14 NGINX_CERT_KEY: ${NGINX_CERT_KEY:-/etc/nginx/certs/privatekey.pem}
15 volumes:
@@ -20,7 +19,7 @@ services:
19 - /bin/sh
20 - -c
21 - |
23 - portal_host="$${PORTAL_HOST:-$${PORTAL_URL#*://}}"
22 + portal_host="$${PORTAL_URL#*://}"
23 portal_host="$${portal_host%%/*}"
24 portal_host="$${portal_host%%:*}"
25 export PORTAL_HOST="$${portal_host:-localhost}"
frontend/Dockerfile
+1 -1
@@ -14,7 +14,7 @@ FROM deps AS api-builder
14 COPY . .
15 RUN npm run build:api
16
17 -FROM node:22-slim AS api
17 +FROM node:22-alpine AS api
18 WORKDIR /app
19
20 COPY --from=api-builder /src/dist-api ./dist-api
frontend/nginx.conf
+2
@@ -1,6 +1,8 @@
1 server {
2 listen 8080;
3 server_name _;
4 + access_log off;
5 + error_log /var/log/nginx/error.log warn;
6
7 root /usr/share/nginx/html;
8 index index.html;
nginx.conf.template
+3
@@ -42,6 +42,9 @@ stream {
42 }
43
44 http {
45 + access_log off;
46 + error_log /var/log/nginx/error.log warn;
47 +
48 sendfile on;
49 tcp_nopush on;
50 tcp_nodelay on;