fix: Remove duplicate daemon directive in nginx config
Use standard nginx.conf and only override the site config in sites-available. This prevents the 'daemon' directive duplicate error. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
df5c8a95d4
commit
0a817fa0d0
|
|
@ -59,15 +59,11 @@ RUN rm -f /tmp/cpptools.vsix /tmp/platformio.vsix
|
||||||
RUN apt-get update && apt-get install -y socat nginx && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y socat nginx && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# nginx als Reverse Proxy für code-server (fixiert Subpath-Routing)
|
# nginx als Reverse Proxy für code-server (fixiert Subpath-Routing)
|
||||||
RUN printf 'daemon off;\n\
|
RUN mkdir -p /etc/nginx/sites-available && printf 'server {\n\
|
||||||
pid /tmp/nginx.pid;\n\
|
|
||||||
events { worker_connections 1024; }\n\
|
|
||||||
http {\n\
|
|
||||||
access_log /tmp/nginx-access.log;\n\
|
|
||||||
error_log /tmp/nginx-error.log;\n\
|
|
||||||
server {\n\
|
|
||||||
listen 8080;\n\
|
listen 8080;\n\
|
||||||
server_name localhost;\n\
|
server_name localhost;\n\
|
||||||
|
access_log /tmp/nginx-access.log;\n\
|
||||||
|
error_log /tmp/nginx-error.log;\n\
|
||||||
location / {\n\
|
location / {\n\
|
||||||
proxy_pass http://127.0.0.1:8081;\n\
|
proxy_pass http://127.0.0.1:8081;\n\
|
||||||
proxy_http_version 1.1;\n\
|
proxy_http_version 1.1;\n\
|
||||||
|
|
@ -78,8 +74,7 @@ http {\n\
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;\n\
|
proxy_set_header X-Forwarded-Proto $scheme;\n\
|
||||||
}\n\
|
}\n\
|
||||||
}\n\
|
}\n' > /etc/nginx/sites-available/default && ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
|
||||||
}\n' > /etc/nginx/nginx.conf
|
|
||||||
|
|
||||||
# Entrypoint-Script - startet nginx + socat + code-server
|
# Entrypoint-Script - startet nginx + socat + code-server
|
||||||
RUN printf '#!/bin/bash\n\
|
RUN printf '#!/bin/bash\n\
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user