Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,3 @@ install-pull-config:
install-docs:
cd mie-opensource-landing && npm install --production
cd mie-opensource-landing && npm run build
install -m644 -oroot -groot mie-opensource-landing/systemd/opensource-docs.service /etc/systemd/system/opensource-docs.service
systemctl daemon-reload || true
systemctl enable opensource-docs.service
systemctl start opensource-docs.service || true
31 changes: 4 additions & 27 deletions create-a-container/views/nginx-conf.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -435,34 +435,11 @@ http {
proxy_pass http://error_pages;
}

# Proxy to documentation site
# Serve documentation site statically
location / {
proxy_pass http://localhost:2998;
proxy_http_version 1.1;

# Proxy headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;

# WebSocket support
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

# Timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;

# Buffering (disable for SSE/streaming)
proxy_buffering off;
proxy_request_buffering off;

# Allow large uploads
client_max_body_size 2G;
root /opt/opensource-server/mie-opensource-landing/build;
index index.html;
try_files $uri $uri/ $uri.html /404.html =404;
}
}
<%_ }) _%>
Expand Down
9 changes: 6 additions & 3 deletions images/docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
FROM nodejs

RUN apt-get update && \
apt-get install -y make && \
apt-get install -y make nginx && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY . /opt/opensource-server
RUN cd /opt/opensource-server && make install-docs

EXPOSE 2998
LABEL org.mieweb.opensource-server.services.http.default-port=2998
# Replace the default nginx site with our docs config
COPY ./images/docs/docs-site.conf /etc/nginx/sites-enabled/default

EXPOSE 80
LABEL org.mieweb.opensource-server.services.http.default-port=80
16 changes: 16 additions & 0 deletions images/docs/docs-site.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
server {
listen 80 default_server;
listen [::]:80 default_server;

root /opt/opensource-server/mie-opensource-landing/build;
index index.html;

# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;

location / {
try_files $uri $uri/ $uri.html /404.html =404;
}
}
18 changes: 0 additions & 18 deletions mie-opensource-landing/systemd/opensource-docs.service

This file was deleted.

Loading