Commit Graph
9 Commits
Author SHA1 Message Date
kennethobsequio 843fc38f12 perf(docker): slim api image from 1.44GB to 657MB
The api image shipped every build artifact pnpm produced:

  - pnpm store + caches            769 MB
  - ffprobe-static (5 platforms)   335 MB
  - devDependencies (jest et al.)  included
  - pm2, npm cache                 ~38 MB

Split the build into a deps stage that installs with --prod and drops the
pnpm store/caches in the same layer (node_modules entries are hardlinks, so
they survive), then copy only node_modules into a clean runtime stage.

ffprobe-static ships ffprobe for darwin/linux/win32 + ia32/x64 but both
services already prefer a system ffprobe via `which ffprobe`, so its binaries
are stripped and apk ffmpeg provides ffprobe instead. That also adds the
ffmpeg binary services/ffmpeg.service.js needs for the mov/mkv fast-start
remux, which the old image never had.

Drop pm2: docker's restart policy covers crashes, and node now receives
SIGTERM directly (~17 MB image, ~40 MB RSS saved on a 1.9 GB droplet).

Verified on the QAS droplet: clean build 98s (was ~3m54s deploy step),
code-only rebuild 8s, all runtime deps + sharp + typst + ffprobe resolve,
container boots to the DB handshake.

Also prune superseded layers in the deploy workflow.
2026-10-29 00:00:11 +08:00
kennethobsequio c66e65d718 Fix production Compose project name
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
2026-09-22 01:45:06 +08:00
kennethobsequio 6b35bc7860 ci: redeploy
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
2026-09-22 01:35:31 +08:00
kennethobsequio 9e162bd595 ci: deploy
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
2026-09-21 23:26:01 +08:00
kennethobsequioandClaude Sonnet 5 832c8e078b chore: gitignore pnpm-lock.yaml, keep pnpm-workspace.yaml tracked
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 13:58:01 +08:00
kennethobsequioandClaude Sonnet 5 10aec3d416 ci: scope deploy workflows to backend-affecting paths only
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 12:21:27 +08:00
kennethobsequio 9ec76ff64d updated git workflow per deployment
Yes to protected wireguard tunnels

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
2026-08-13 20:28:41 +08:00
kennethobsequio 6765c1faba digitalocean droplet is best
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
2026-08-02 00:20:23 +08:00
kennethobsequioandClaude Sonnet 5 c1e48faa56 ci: auto-deploy to droplet on push to main
Adds a GitHub Actions workflow that SSHes into the API droplet on every
push to main and runs deploy.sh (git pull + npm install + systemctl
restart). The deploy key is restricted server-side via a forced-command
in authorized_keys, so it can only ever run that one script.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-01 14:26:11 +08:00