diff --git a/Dockerfile.docs b/Dockerfile.docs index 0c07e14..442705a 100644 --- a/Dockerfile.docs +++ b/Dockerfile.docs @@ -10,6 +10,7 @@ RUN npm run build FROM nginx:alpine RUN rm /etc/nginx/conf.d/default.conf COPY docs/nginx.conf /etc/nginx/conf.d/default.conf -COPY --from=builder /app/.vitepress/dist /usr/share/nginx/html +# base is /docs/ (see docs/.vitepress/config.mts) — the site lives under /docs/ +COPY --from=builder /app/.vitepress/dist /usr/share/nginx/html/docs EXPOSE 80 diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 2134086..f70c59d 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -2,6 +2,9 @@ import { defineConfig } from 'vitepress' import { withMermaid } from 'vitepress-plugin-mermaid' export default withMermaid(defineConfig({ + // Served under https://pruefwerk-.breakpilot.com/docs/ (orca route + // /docs/* on the dashboard host, prefix not stripped). + base: '/docs/', title: 'Prüfwerk', description: 'AI-powered security compliance scanning platform', ignoreDeadLinks: [ diff --git a/docs/nginx.conf b/docs/nginx.conf index 27c304f..3bc447e 100644 --- a/docs/nginx.conf +++ b/docs/nginx.conf @@ -4,8 +4,15 @@ server { root /usr/share/nginx/html; index index.html; - location / { - try_files $uri $uri/ $uri.html /index.html; + # The VitePress build uses base /docs/ and is copied to html/docs, so the + # site answers on /docs/… both standalone and behind the orca route + # pruefwerk-.breakpilot.com/docs/* (prefix not stripped). + location = / { + return 302 /docs/; + } + + location /docs/ { + try_files $uri $uri/ $uri.html /docs/index.html; } location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {