Commit graph

11 commits

Author SHA1 Message Date
3c9b9d3188 Move backup volume to /var/backups/outline so DokPloy redeploys don't wipe it
The 4 AM export push triggers a DokPloy redeploy which rm-rf's the code
directory — including ./backups/. Using an absolute path outside the code
dir keeps backups safe across redeploys.
2026-04-09 09:21:50 +01:00
83c987bb71 Bake cron scripts into the image instead of bind-mounting them
DokPloy's redeploy process rm -rf's the host code dir and recreates it.
The cron container is `restart: unless-stopped` so docker-compose
doesn't recreate it when only scripts/* change — but its bind mount on
./scripts:/app/scripts then points at orphaned inodes inside the
running container, leaving /app/scripts empty until someone manually
`docker restart`s it.

Bake the scripts into the image instead. A scripts/* change now forces
a Dockerfile rebuild → docker-compose recreates the cron service →
fresh /app/scripts inside, no manual restart required. content/ and
.git/ stay bind-mounted because the export job needs to write commits
the host can see.

Also adds .dockerignore so the host's scripts/node_modules (potentially
darwin-specific) doesn't get COPY'd into the alpine image and shadow
the deps installed by `npm install` at build time.
2026-04-08 12:06:04 +01:00
2085ad5103 Fix cron container so daily wiki export actually runs
The cron has been silently failing every day since 2026-03-28. Four
independent bugs were stacked:

1. cron/entrypoint.sh: env dump used `sed` to wrap each line in
   `export `, but values with spaces (e.g. GIT_SSH_COMMAND, OIDC_SCOPES)
   produced lines like `export GIT_SSH_COMMAND=ssh -o UserKnownHosts...`
   which `export` parses as a flag and aborts. busybox ash treats the
   builtin error as fatal, so `. /etc/environment.sh; script.sh` never
   reaches the script. Now single-quote each value with proper escaping.

2. cron/Dockerfile: NODE_PATH only works for CommonJS `require()`, not
   ESM `import`. The export script is `"type": "module"` and failed with
   "Cannot find package 'gray-matter'". Install deps at /app/node_modules
   instead — Node ESM walks up from /app/scripts and finds it there.

3. docker-compose.yml: `~/.ssh:/root/.ssh:ro` — DokPloy does NOT expand
   `~`, so it created a literal `~` directory inside the deployment dir
   and mounted that empty dir. The container had no SSH key. Use the
   absolute host path `/root/.ssh` instead.

4. cron/entrypoint.sh: even with the SSH key, `git push` would fail
   because the git remote is HTTPS and the host's git server runs on
   port 2222 (set in /root/.ssh/config). Add a `pushInsteadOf` rewrite
   so push uses SSH while DokPloy can keep fetching via HTTPS, and stop
   re-running ssh-keyscan against the wrong port — copy the host's
   known_hosts (which already has the :2222 entry) instead.
2026-04-07 11:27:29 +01:00
ed05044464 Block dotfile access, remove custom CSS, fix cron npm install
- nginx: deny all requests to hidden files (/.git/config was publicly readable)
- nginx: remove CSS injection and /custom/ static file serving
- cron: install script deps at build time into /opt to avoid ro mount conflict
- docker-compose: widen cron build context for package.json COPY
- Delete unused theme/ghost-guild.css
2026-03-31 17:53:50 +01:00
b4bd938ac3 Remove hardcoded container names for DokPloy compatibility 2026-03-29 21:17:05 +01:00
cda610dc01 Fix cron build context to match Dockerfile COPY paths 2026-03-29 21:15:52 +01:00
8e7424ed05 Add cron container for daily backups and content export
- Add cron service to docker-compose with backup (3 AM) and export (4 AM) schedules
- Remove redundant content/articles/ and content/curriculum/ (now in Outline, exported to content/wiki/)
- Fix env var mismatch: support both OUTLINE_API_KEY and OUTLINE_API_TOKEN
- Drop updatedAt from export frontmatter to reduce noisy commits
- Add backups/ to gitignore
2026-03-24 09:14:16 +00:00
f3302b1c5a Fix docker-compose for DokPloy compose deployment
Use .env instead of outline.env, reference existing named volumes
as external so data persists across DokPloy redeploys.
2026-03-04 17:53:42 +00:00
fdf96fe820 Add nginx proxy for OG meta tags and CSS injection
Traefik was routing directly to Outline, so the nginx.conf
was unused. Add nginx as an intermediary service to enable
sub_filter injection of OG tags on the homepage and custom
CSS on all pages.
2026-03-02 11:16:26 +00:00
289e673cbc Replace Nuxt wiki with Outline deployment config
Strip the Nuxt 4 static site and replace with Docker Compose config
for self-hosted Outline wiki (Outline + PostgreSQL 16 + Redis 7).
Adds nginx reverse proxy with WebSocket support and CSS injection,
migration script for existing markdown articles, backup script,
and starter theme CSS.
2026-03-01 15:45:44 +00:00
952cee5fb7 Initial commit 2025-11-11 19:12:21 +00:00