summaryrefslogtreecommitdiff
path: root/deploy-docker.sh
AgeCommit message (Collapse)Author
2026-10-22deploy: detect a detached nginx.conf bind mount instead of trusting reloadVoid Agent
The single-file mount pins the inode present when the container started. A rename-based write leaves the container serving stale bytes while nginx -t validates them, which is exactly how the previous deploy reported success with an unchanged config. Compare the host and in-container checksums after the reload and restart the container to re-resolve the path on mismatch.
2026-10-22deploy: write nginx.conf in place so the container's bind mount sees itVoid Agent
nginx.conf is mounted as a single file. rsync renames a temp over the destination, which replaces the inode, so the container kept reading the old inode: nginx -t validated the old bytes, reload was a no-op, and the deploy reported success while the live config was unchanged. Stage to nginx.conf.new, copy in place with cat so the mounted inode keeps its identity, then test and reload. Rollback copies in place too, for the same reason.
2026-10-22nginx: serve public_key to curl cleanly, restore lost security headersVoid Agent
`curl https://jayrup.me/public_key` is the documented way to get this key onto a VPS, so both the file and the config serving it need to be exact. Key file: drop the trailing space, one trailing newline. A key with no trailing newline makes `curl ... >> ~/.ssh/authorized_keys` glue itself onto the previous line and silently break every later key in the file. nginx: - `/assets/public_key` ignored $final_suffix, so curl got 404 while browsers got 200. Route both through the suffix-aware try_files. - add_header does not merge across levels: the asset, PDF and .txt locations each declared one, so they inherited none of the security headers. The asset location now repeats them; the PDF and .txt locations no longer declare any (default_type / mime.types + charset do the job), so they inherit again. - `add_header Content-Type application/pdf` appended a second Content-Type instead of setting it. Use default_type. - `expires 30d` plus an explicit Cache-Control emitted two Cache-Control headers. Use one explicit header. - add `charset utf-8` so text/plain (what curl gets) is not served charset-less while the content contains non-ASCII. deploy: ship nginx.conf alongside public/. It is bind-mounted into the container, so it never travelled with the rsync'd tree — the live config was from May and predated the hardening committed in 0ee667a. Test with `nginx -t` before reloading and restore the previous config on failure.
2026-09-22deploy: ship public_key.txt so curl UA can fetch the keyhermes
2026-09-02fix: title frontmatter, terminal resume, project list sync, nginx hardening, ↵CaptainJack2491
and styles
2026-07-31harden deploy: strict mode, mktemp build dirs, pinned quarto digest, no ↵Void Agent
fixed /tmp paths
2026-07-31fix deploy-docker.sh: use devxygmbh/alpine-quarto (quarto/quarto does not ↵Void Agent
exist on Docker Hub)
2026-07-31add dockerized deploy script + post-receive hook for push-to-deployVoid Agent