Refactor configuration handling: implement dynamic loading of config and cache paths for improved security and flexibility in Docker environments

This commit is contained in:
David Dyer committed 2026-10-25 16:49:43 -04:00
1 parent c7b836bcf2
commit bb65ecd43c
7 files changed
+53 -12

No files matched your search

+8 -4
View File
@@ -6,9 +6,14 @@
*
* This is an allowlist by design: only the files and folders listed below
* are copied. Dev-only stuff (node_modules/, src/, package*.json, .git/,
* .claude/, docker-compose.yaml, dev.sh, .hintrc, config.example.php, the
* live db/fitz.sqlite, ...) never ends up in dist/ — including anything
* added later, since it has to be added here explicitly first.
* .claude/, docker-compose.yaml, dev.sh, .hintrc, config.php,
* config.example.php, the live db/fitz.sqlite, ...) never ends up in
* dist/ — including anything added later, since it has to be added here
* explicitly first.
*
* config.php is deliberately excluded: it holds live secrets and lives
* outside the web root on the server (see FITZ_CONFIG_PATH in
* docker-compose.yaml), so a deploy can never overwrite it.
*
* Run with: npm run dist
*/
@@ -25,7 +30,6 @@ const FILES = [
'main.js',
'styles.css',
'robots.txt',
'config.php', // holds the live FB_PAGE_ACCESS_TOKEN — see README before sharing dist/ anywhere but the server
];
const DIRS = ['admin', 'assets', 'bin', 'inc'];