Commit graph

14 commits

Author SHA1 Message Date
053357899d fix(docker): entrypoint runs migrations via scripts/start.js
Upstream Dockerfile sets `ENTRYPOINT [ "node", "./dist/index.js" ]`,
which boots the daemon directly and silently bypasses `scripts/start.js`
— the only place that runs `prisma migrate deploy`. On a clean install,
the SQLite db file at $DATABASE_URL is created empty (0 bytes) and
every Policy / KeyUser / Token / SigningCondition operation throws
"table does not exist." `ping` / `get_keys` / `create_new_key` happen
to survive because they only touch the JSON config, not the db.

Two changes:

1. ENTRYPOINT switches to `node ./scripts/start.js`. The CMD arg
   (`start`) and any additional argv pass through to the daemon
   unchanged via process.argv.

2. Runtime pnpm install drops `--prod`. The prisma CLI lives in
   devDependencies; with `--prod`, `npx prisma migrate deploy` tries to
   download prisma@latest at runtime, which OOMs in modest containers.
   Including devDeps at runtime adds modest image bulk for correctness.

Validated end-to-end against the local regtest stack — after the
rebuild the SQLite db boots populated with 22 migrations, and the
lnbits-side admin spike harness passes all 9 steps including NIP-46
sign_event with Schnorr-valid signatures.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 17:05:10 +02:00
960b9399e8 Dockerfile: switch from npm to pnpm + drop --frozen-lockfile
Two upstream-rot issues fixed in one commit (same root cause: the
upstream Dockerfile predates the move to pnpm and the lockfile has
drifted):

- npm install can't resolve workspace:* deps (which package.json used
  to declare for @nostr-dev-kit/ndk — see prior commit for the pin).
  Switching to pnpm@9 matches the lockfile that ships in-repo.

- pnpm-lock.yaml is out of date vs package.json (likely from
  generation-time vs commit-time drift), so --frozen-lockfile fails
  with ERR_PNPM_OUTDATED_LOCKFILE. Drop the flag in both build and
  runtime stages to let pnpm resolve fresh, at the cost of giving up
  determinism — to be restored once the lockfile is regenerated.

Also reorders the build stage to COPY lockfile + manifest before the
source, so the install layer caches across source-only edits.

Fixes #1, #2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 00:29:41 +02:00
Nour
1d4251c23e
feat: cleanup docker setup
- Add .dockerignore
- Replace .env with .env.example
- Add migrations service
- Cleanup Dockerfile: simpler setup, simpler copy, no migrations inside the image
- Update README to match new instruction
2024-01-23 17:43:02 +00:00
Pablo Fernandez
c92b169435 fix wrong nip46 key used 2024-01-08 15:29:54 +00:00
Fishcake
1652419cd3
reduce Docker image size and use alpine as base 2023-12-22 21:42:06 +09:00
Pablo Fernandez
02518c21a3
Merge pull request #10 from IngwiePhoenix/arm64-support
Optimize Dockerfile, add arm64!
2023-12-01 18:42:11 +02:00
Ingwie Phoenix
5acc1d9af7 Optimize Dockerfile, add arm64!
Removing "--platform=" and slightly re-structuring the "apt-get" calls allows for this image to be successfuly built for arm64 as well - at least on an arm64 host.
2023-08-18 15:12:49 +02:00
pablof7z
c7f546add1 Check if existing signing conditions belong to a revoked user 2023-07-08 12:34:51 +02:00
pablof7z
88811fbcd2 save package version in config file 2023-07-06 22:58:38 +02:00
pablof7z
db0c9ae3fb minor improvements 2023-06-28 21:44:39 +02:00
pablof7z
f949c116db write to a file the connection string 2023-06-27 01:59:39 +02:00
pablof7z
6775855e0c fix import 2023-06-25 15:35:48 +02:00
pablof7z
6712c4d48a load admin npubs from env 2023-06-25 15:04:40 +02:00
pablof7z
28f4788aec updates 2023-05-31 20:27:33 +02:00