You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by jb...@apache.org on 2026/07/27 14:51:10 UTC
(polaris-tools) branch main updated: Fix console 404 issue when accessing via domain_name (#255)
This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris-tools.git
The following commit(s) were added to refs/heads/main by this push:
new 8ffe1e5 Fix console 404 issue when accessing via domain_name (#255)
8ffe1e5 is described below
commit 8ffe1e52ed78579a815905d8414702d1082e5a18
Author: Yong Zheng <yo...@gmail.com>
AuthorDate: Mon Jul 27 09:51:05 2026 -0500
Fix console 404 issue when accessing via domain_name (#255)
---
console/docker/Dockerfile | 4 ++--
console/docker/generate-config.sh | 5 -----
console/docker/nginx.conf | 9 ++-------
3 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/console/docker/Dockerfile b/console/docker/Dockerfile
index 6758d9b..269f226 100644
--- a/console/docker/Dockerfile
+++ b/console/docker/Dockerfile
@@ -50,8 +50,8 @@ RUN groupadd --gid 10001 polaris && \
COPY LICENSE-BUNDLE /LICENSE
COPY NOTICE /NOTICE
-# Copy custom nginx configuration as template
-COPY docker/nginx.conf /opt/app-root/etc/nginx.d/default.conf.template
+# Copy location blocks into the UBI default server block via nginx.default.d include
+COPY docker/nginx.conf /opt/app-root/etc/nginx.default.d/default.conf
# Copy runtime config generation script
COPY --chown=10000:10001 --chmod=744 docker/generate-config.sh /generate-config.sh
# Copy built application from builder stage
diff --git a/console/docker/generate-config.sh b/console/docker/generate-config.sh
index 3f311dd..53effa4 100644
--- a/console/docker/generate-config.sh
+++ b/console/docker/generate-config.sh
@@ -16,11 +16,6 @@
# specific language governing permissions and limitations
# under the License.
-# Copy nginx configuration (no substitution needed since we use direct API calls)
-cp /opt/app-root/etc/nginx.d/default.conf.template /opt/app-root/etc/nginx.d/default.conf
-
-echo "Configured nginx for static file serving"
-
# Generate runtime configuration from environment variables
cat > /opt/app-root/src/config.js << EOF
// Runtime configuration generated from environment variables
diff --git a/console/docker/nginx.conf b/console/docker/nginx.conf
index 0d9f949..1bd7ebe 100644
--- a/console/docker/nginx.conf
+++ b/console/docker/nginx.conf
@@ -15,12 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-server {
- listen 8080;
- server_name localhost;
- root /opt/app-root/src;
- index index.html;
-
# Gzip compression
gzip on;
gzip_vary on;
@@ -32,6 +26,8 @@ server {
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
+ index index.html;
+
# Serve static files
location / {
try_files $uri $uri/ /index.html;
@@ -56,4 +52,3 @@ server {
return 200 "healthy\n";
add_header Content-Type text/plain;
}
-}