File tree Expand file tree Collapse file tree 2 files changed +21
-14
lines changed
Expand file tree Collapse file tree 2 files changed +21
-14
lines changed Original file line number Diff line number Diff line change @@ -7,24 +7,14 @@ RUN apk add --no-cache gettext
77COPY index.html /usr/share/nginx/html/index.html
88COPY app.css /usr/share/nginx/html/app.css
99
10+ # Copy nginx config
11+ COPY default.conf /etc/nginx/conf.d/default.conf
12+
1013# Copy entrypoint script
1114COPY entrypoint.sh /entrypoint.sh
1215RUN chmod +x /entrypoint.sh
1316
14- # Configure nginx to serve on port 3071 with healthcheck
15- RUN echo 'server { \
16- listen 3071; \
17- location / { \
18- root /usr/share/nginx/html; \
19- index index.html; \
20- } \
21- location = /ops/healthcheck { \
22- access_log off; \
23- return 200 "OK"; \
24- add_header Content-Type text/plain; \
25- } \
26- }' > /etc/nginx/conf.d/default.conf
27-
2817EXPOSE 3071
2918
3019ENTRYPOINT ["/entrypoint.sh" ]
20+ CMD ["nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change 1+ server {
2+ listen 3071;
3+
4+ # Healthcheck endpoint for Kubernetes probes
5+ location = /ops/healthcheck {
6+ access_log off;
7+ return 200 "healthy\n";
8+ add_header Content-Type text/plain;
9+ }
10+
11+ location / {
12+ root /usr/share/nginx/html;
13+ index index.html;
14+ try_files $uri $uri/ =404;
15+ }
16+ }
17+
You can’t perform that action at this time.
0 commit comments