2024-09-27 08:16:09 +00:00
|
|
|
FROM python:3.12.6-slim@sha256:15bad989b293be1dd5eb26a87ecacadaee1559f98e29f02bf6d00c8d86129f39 AS builder
|
2024-08-01 21:46:28 +00:00
|
|
|
|
|
|
|
WORKDIR /monero-docs
|
|
|
|
|
|
|
|
COPY . /monero-docs
|
|
|
|
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
|
RUN mkdocs build
|
|
|
|
|
2024-09-27 08:16:09 +00:00
|
|
|
FROM nginx:alpine@sha256:a5127daff3d6f4606be3100a252419bfa84fd6ee5cd74d0feaca1a5068f97dcf
|
2024-08-01 21:46:28 +00:00
|
|
|
|
|
|
|
COPY --from=builder /monero-docs/public /usr/share/nginx/html
|
|
|
|
|
|
|
|
# Inline Nginx configuration
|
|
|
|
RUN echo 'server { \
|
|
|
|
listen 80; \
|
2024-08-29 23:29:10 +00:00
|
|
|
add_header Onion-Location http://xmrdoc6phnvjbf5hmjbwdfu47zavzfngymlnwhs2gyxxpxmad4c65kyd.onion$request_uri; \
|
2024-08-30 10:25:16 +00:00
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"; \
|
|
|
|
add_header Referrer-Policy "no-referrer"; \
|
|
|
|
add_header X-XSS-Protection "0"; \
|
|
|
|
add_header X-Frame-Options "DENY"; \
|
|
|
|
add_header X-Content-Type-Options "nosniff"; \
|
|
|
|
add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), autoplay=(), battery=(), camera=(), clipboard-read=(), clipboard-write=(), display-capture=(), document-domain=(), encrypted-media=(), fullscreen=(), geolocation=(), gyroscope=(), hid=(), idle-detection=(), interest-cohort=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), sync-xhr=(), usb=(), xr-spatial-tracking=()"; \
|
2024-08-01 21:46:28 +00:00
|
|
|
root /usr/share/nginx/html; \
|
|
|
|
index index.html index.htm; \
|
|
|
|
error_page 404 /404.html; \
|
|
|
|
location = /404.html { \
|
|
|
|
internal; \
|
|
|
|
} \
|
|
|
|
location / { \
|
|
|
|
try_files $uri $uri/ =404; \
|
|
|
|
} \
|
|
|
|
}' > /etc/nginx/conf.d/default.conf
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|