Claude commited on
Commit ·
a1fc7b8
1
Parent(s): de8e241
Fix: Use custom nginx config for port 7860
Browse filesFiles changed (2)
- Dockerfile+2-9
- nginx.confAdded+37
123456789101112131415# Use the official BentoPDF image from Docker HubFROM bentopdf/bentopdf:latest# Debug: Show original configRUN echo "=== BEFORE ===" && cat /etc/nginx/conf.d/default.conf | grep listen# Override nginx to listen on port 7860 (Hugging Face default)# Use regex to handle multiple spacesRUN sed -i 's/listen\s\+8080/listen 7860/g' /etc/nginx/conf.d/default.conf# Debug: Show modified configRUN echo "=== AFTER ===" && cat /etc/nginx/conf.d/default.conf | grep listen# Expose the portEXPOSE 786012345678# Use the official BentoPDF image from Docker HubFROM bentopdf/bentopdf:latest# Copy custom nginx config that listens on port 7860COPY nginx.conf /etc/nginx/nginx.conf# Expose the portEXPOSE 7860
12345678910111213141516171819202122232425262728293031323334353637worker_processes 1;
error_log /var/log/nginx/error.log warn;pid /tmp/nginx.pid;
events { worker_connections 1024;}
http { include /etc/nginx/mime.types; default_type application/octet-stream;
sendfile on; keepalive_timeout 65;
server { listen 7860; server_name localhost;
root /usr/share/nginx/html; index index.html index.htm;
location / { try_files $uri $uri/ /index.html; }
# Required headers for SharedArrayBuffer (LibreOffice WASM) add_header Cross-Origin-Opener-Policy "same-origin" always; add_header Cross-Origin-Embedder-Policy "require-corp" always;
error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }}Dockerfile+2-9
nginx.confAdded+37