diff --git a/Dockerfile b/Dockerfile index 85df462..9811d88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,10 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . . RUN mkdocs build --clean +FROM joseluisq/static-web-server:2 + FROM nginx:alpine -COPY --from=builder /docs/site /usr/share/nginx/html -EXPOSE 80 \ No newline at end of file +COPY config.toml /config.toml +COPY --from=builder /docs/site /public +ENV SWS_CONFIG_FILE=/config.toml +EXPOSE 8080 \ No newline at end of file diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..4708478 --- /dev/null +++ b/config.toml @@ -0,0 +1,14 @@ +[general] +host = "0.0.0.0" +port = 8080 +root = "/public" +log-level = "error" +compression = true + +[[advanced.headers]] +source = "**/*" +[advanced.headers.headers] +"X-Frame-Options" = "DENY" +"X-Content-Type-Options" = "nosniff" +"Referrer-Policy" = "strict-origin-when-cross-origin" +"Content-Security-Policy" = "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;" \ No newline at end of file