nsecbunkerd icon indicating copy to clipboard operation
nsecbunkerd copied to clipboard

Latest Docker image not working

Open szollo opened this issue 1 year ago • 1 comments

I'm following the README instructions, and when I try to run the latest Docker image I get the following error:

 > mkdir $HOME/.nsecbunker-config
 > docker run -d --name nsecbunkerd -v $HOME/.nsecbunker-config:/app/config pablof7z/nsecbunkerd start --admin npub100n0yahp4kan33pz3htw5e5qegs3t5umesesjp9ycz3l4xpwawws988nqc; docker exec -i nsecbunkerd npx prisma db push; docker logs -f nsecbunkerd
2e1c389f2417b58262fefcab41664ce2f3a61c91551f88e5f4c7a13deec2748e
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "nsecbunker.db" at "file:../config/nsecbunker.db"

SQLite database nsecbunker.db created at file:../config/nsecbunker.db

🚀  Your database is now in sync with your Prisma schema. Done in 38ms

✔ Generated Prisma Client (v5.6.0) to ./node_modules/@prisma/client in 148ms

Running migrations
Error: P3005

The database schema is not empty. Read more about how to baseline an existing production database: https://pris.ly/d/migrate-baseline

Error: Command failed: npm run prisma:migrate
Error: P3005

The database schema is not empty. Read more about how to baseline an existing production database: https://pris.ly/d/migrate-baseline


    at checkExecSyncError (node:child_process:890:11)
    at execSync (node:child_process:962:15)
    at Object.<anonymous> (/app/scripts/start.js:5:3)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49 {
  status: 1,
  signal: null,
  output: [
    null,
    <Buffer 0a 3e 20 6e 73 65 63 62 75 6e 6b 65 72 64 40 30 2e 31 30 2e 30 20 70 72 69 73 6d 61 3a 6d 69 67 72 61 74 65 0a 3e 20 6e 70 78 20 70 72 69 73 6d 61 20 ... 188 more bytes>,
    <Buffer 45 72 72 6f 72 3a 20 50 33 30 30 35 0a 0a 54 68 65 20 64 61 74 61 62 61 73 65 20 73 63 68 65 6d 61 20 69 73 20 6e 6f 74 20 65 6d 70 74 79 2e 20 52 65 ... 99 more bytes>
  ],
  pid: 17,
  stdout: <Buffer 0a 3e 20 6e 73 65 63 62 75 6e 6b 65 72 64 40 30 2e 31 30 2e 30 20 70 72 69 73 6d 61 3a 6d 69 67 72 61 74 65 0a 3e 20 6e 70 78 20 70 72 69 73 6d 61 20 ... 188 more bytes>,
  stderr: <Buffer 45 72 72 6f 72 3a 20 50 33 30 30 35 0a 0a 54 68 65 20 64 61 74 61 62 61 73 65 20 73 63 68 65 6d 61 20 69 73 20 6e 6f 74 20 65 6d 70 74 79 2e 20 52 65 ... 99 more bytes>
}
/app/dist/index.js:180
  for (const [domain, config] of Object.entries(domains)) {
                                        ^

TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at nip89announcement (/app/dist/index.js:180:41)
    at start (/app/dist/index.js:261:3)

Node.js v20.10.0

FYI I was able to fix it locally by rebuilding the docker image using this commit!

szollo avatar Jan 07 '24 13:01 szollo

I get the same error with the docker image pablof7z/nsecbunkerd:latest (ea2c225be491) and an empty config directory.

flox1an avatar Jan 19 '24 12:01 flox1an