Skip to content

Commit 20a841e

Browse files
committed
fix(centraldashboard): finalize nginx config
1 parent 060c300 commit 20a841e

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

components/centraldashboard/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ FROM nginx:1.25-alpine AS serve
2323
# Copy built static assets from build stage
2424
COPY --from=build --chown=nginx:nginx /centraldashboard/public /usr/share/nginx/html
2525
COPY --from=build --chown=nginx:nginx /centraldashboard/app.bundle.js /centraldashboard/app.css /usr/share/nginx/html/
26+
COPY nginx.conf /etc/nginx/conf.d/default.conf
2627

2728
EXPOSE 8082
2829

components/centraldashboard/nginx.conf

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,14 @@ server {
33
server_name _;
44
root /usr/share/nginx/html;
55
index index.html;
6-
7-
# Static assets caching
6+
7+
# Cache static assets
88
location ~ \.(js|css|png|ico)$ {
99
expires 1y;
1010
add_header Cache-Control "public, immutable";
1111
}
12-
13-
# API proxy (keep if backend needed)
14-
location /apis/ {
15-
proxy_pass http://backend:8082/; # Or remove if not needed
16-
proxy_set_header Host $host;
17-
}
18-
19-
# SPA routing (catch all)
12+
13+
# SPA routing
2014
location / {
2115
try_files $uri $uri/ /index.html;
2216
}

0 commit comments

Comments
 (0)