File tree Expand file tree Collapse file tree
components/centraldashboard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ FROM nginx:1.25-alpine AS serve
2323# Copy built static assets from build stage
2424COPY --from=build --chown=nginx:nginx /centraldashboard/public /usr/share/nginx/html
2525COPY --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
2728EXPOSE 8082
2829
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments