Add Dockerfile and compose setup for self-hosting #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "docker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a Docker setup for running Papure on a VPS.
What's included
Dockerfile: builds the static PWA with Node 24, then servesbuild/with nginx.docker/nginx.conf:/_app/immutable/assets are cached for a year,index.htmlandservice-worker.jsareno-cache, so updates reach clients,.webmanifestis served asapplication/manifest+json(nginx's default MIME table lacks it).compose.yaml: one service on port8080, whichPAPURE_PORTcan change, withrestart: unless-stoppedand a health check..dockerignore: keeps.git,node_modulesand thememos/database out of the build context.HTTPS isn't handled inside the container: put a reverse proxy (Caddy, Traefik, nginx) in front, since the PWA install and service worker need HTTPS.
Testing
docker compose up -d --buildbuilds, and the container reports healthy.curl: correct status codes, content types and cache headers for/, a deep link, the manifest, the service worker and a hashed JS file.🤖 Generated with Claude Code
https://claude.ai/code/session_01VsorPV3JeJRoZ1mD1pdvtL