diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-04-04 19:22:04 +0300 |
|---|---|---|
| committer | Can Celik <ogulcancelik@gmail.com> | 2026-04-05 01:23:06 +0300 |
| commit | 41dd733ca7123c9ac4bfc6c781697a660e95b052 (patch) | |
| tree | 3fc91815ca139ef2e0b281bba0abda4ef15175f4 /vendor/libghostty-vt/src/build/docker/lib-c-docs | |
| parent | 55c138263e190a1e79d4b997bfb9397306c0ec1f (diff) | |
feat: finish ghostty pane backend integration
Diffstat (limited to 'vendor/libghostty-vt/src/build/docker/lib-c-docs')
| -rw-r--r-- | vendor/libghostty-vt/src/build/docker/lib-c-docs/Dockerfile | 38 | ||||
| -rwxr-xr-x | vendor/libghostty-vt/src/build/docker/lib-c-docs/entrypoint.sh | 32 |
2 files changed, 70 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/src/build/docker/lib-c-docs/Dockerfile b/vendor/libghostty-vt/src/build/docker/lib-c-docs/Dockerfile new file mode 100644 index 00000000..a3cfdcc9 --- /dev/null +++ b/vendor/libghostty-vt/src/build/docker/lib-c-docs/Dockerfile @@ -0,0 +1,38 @@ +#-------------------------------------------------------------------- +# Generate documentation with Doxygen +#-------------------------------------------------------------------- +FROM --platform=linux/amd64 archlinux:latest AS builder + +# Build argument for noindex header +ARG ADD_NOINDEX_HEADER=false +RUN pacman -Syu --noconfirm && \ + pacman -S --noconfirm \ + doxygen \ + graphviz && \ + pacman -Scc --noconfirm +WORKDIR /ghostty +COPY include/ ./include/ +COPY images/ ./images/ +COPY dist/doxygen/ ./dist/doxygen/ +COPY example/ ./example/ +COPY Doxyfile ./ +COPY DoxygenLayout.xml ./ +RUN mkdir -p zig-out/share/ghostty/doc/libghostty +RUN doxygen + +#-------------------------------------------------------------------- +# Host the static HTML +#-------------------------------------------------------------------- +FROM nginx:alpine AS runtime + +# Pass build arg to runtime stage +ARG ADD_NOINDEX_HEADER=false +ENV ADD_NOINDEX_HEADER=$ADD_NOINDEX_HEADER + +# Copy documentation and entrypoint script +COPY --from=builder /ghostty/zig-out/share/ghostty/doc/libghostty /usr/share/nginx/html +COPY src/build/docker/lib-c-docs/entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +EXPOSE 80 +CMD ["/entrypoint.sh"] diff --git a/vendor/libghostty-vt/src/build/docker/lib-c-docs/entrypoint.sh b/vendor/libghostty-vt/src/build/docker/lib-c-docs/entrypoint.sh new file mode 100755 index 00000000..ac9ca1c0 --- /dev/null +++ b/vendor/libghostty-vt/src/build/docker/lib-c-docs/entrypoint.sh @@ -0,0 +1,32 @@ +#!/bin/sh +if [ "$ADD_NOINDEX_HEADER" = "true" ]; then + cat > /etc/nginx/conf.d/noindex.conf << 'EOF' +server { + listen 80; + location / { + root /usr/share/nginx/html; + index index.html; + etag on; + add_header Cache-Control "no-cache" always; + add_header X-Robots-Tag "noindex, nofollow" always; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;" always; + } +} +EOF + # Remove default server config + rm -f /etc/nginx/conf.d/default.conf +else + cat > /etc/nginx/conf.d/default.conf << 'EOF' +server { + listen 80; + location / { + root /usr/share/nginx/html; + index index.html; + etag on; + add_header Cache-Control "no-cache" always; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;" always; + } +} +EOF +fi +exec nginx -g "daemon off;" |
