fix: handle unreadable admins.json in Docker and exclude from image

Use fs.accessSync to check read permissions before reading the config
file. If the file exists but isn't readable, log a warning and fall
through to the ADMIN_KEY fallback. Also add config/admins.json to
backend/.dockerignore to prevent it from being copied into the image.

Made-with: Cursor
This commit is contained in:
cottongin
2026-04-05 01:17:22 -04:00
parent 0a59da8ee9
commit 52e9a7af42
2 changed files with 27 additions and 1 deletions

13
backend/.dockerignore Normal file
View File

@@ -0,0 +1,13 @@
node_modules
npm-debug.log
.env
.env.local
*.db
*.sqlite
*.sqlite3
data/
.git
.gitignore
README.md
config/admins.json