feat(deploy): minimal server bootstrap with optional settings overrides - #751
Open
Ferryx349 wants to merge 3 commits into
Open
feat(deploy): minimal server bootstrap with optional settings overrides#751Ferryx349 wants to merge 3 commits into
Ferryx349 wants to merge 3 commits into
Conversation
Add bootstrap.sh, document local vs release-managed files, and merge image defaults with optional settings.yaml overrides instead of seeding a full copy.
🦋 Changeset detectedLatest commit: 654b197 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Collaborator
cameri
approved these changes
Sep 1, 2026
There was a problem hiding this comment.
🟡 Changes recommended
There are confirmed runtime/backwards-compat and operational issues (watcher crash if config dir is missing, dropped settings.json fallback, and .nostr permissions/ownership for bind mounts) that should be addressed before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
test/unit/utils/settings-paths.spec.ts:39
- This assertion hardcodes POSIX-style separators; use a joined path to keep the test platform-independent.
expect(getDefaultSettingsFilePath()).to.equal(`${process.cwd()}/resources/default-settings.yaml`)
- Files reviewed: 10/10 changed files
- Comments generated: 5
- Review effort level: Lite
Comment on lines
301
to
+307
| export const loadUserSettings = (): Settings => { | ||
| ensureSettingsExists() | ||
| const raw = fs.readFileSync(getSettingsFilePath(), 'utf-8') | ||
| const settingsPath = getSettingsFilePath() | ||
|
|
||
| if (!fs.existsSync(settingsPath)) { | ||
| return {} as Settings | ||
| } |
Comment on lines
103
to
107
| public static watchSettings() { | ||
| const basePath = SettingsStatic.getSettingsFileBasePath() | ||
| const defaultsFilePath = SettingsStatic.getDefaultSettingsFilePath() | ||
| const basePath = getConfigBaseDir() | ||
| const defaultsFilePath = getDefaultSettingsFilePath() | ||
| const fileType = SettingsStatic.settingsFileType(basePath) | ||
|
|
Comment on lines
+25
to
+28
| expect(getConfigBaseDir()).to.equal(`${process.cwd()}/.nostr`) | ||
| expect(getSettingsFilePath()).to.equal(`${process.cwd()}/.nostr/settings.yaml`) | ||
| expect(getSettingsBackupDir()).to.equal(`${process.cwd()}/.nostr/backups`) | ||
| expect(getSettingsAuditLogPath()).to.equal(`${process.cwd()}/.nostr/settings-audit.jsonl`) |
Comment on lines
+28
to
+29
| mkdir -p "$TARGET/.nostr/data" "$TARGET/.nostr/db-logs" | ||
|
|
Comment on lines
+84
to
89
| ```bash | ||
| cp deploy/settings.yaml.example /opt/nostream/.nostr/settings.yaml | ||
| # edit overrides only — not a full copy of default-settings.yaml | ||
| chown 1000:1000 /opt/nostream/.nostr/settings.yaml | ||
| chmod 600 /opt/nostream/.nostr/settings.yaml | ||
| docker compose up -d |
Restore settings.json fallback for backwards compatibility, ensure the config directory exists before watchSettings() runs, fix cross-platform path assertions, and chown .nostr for the node user in bootstrap/docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On the sandbox server, compose and copied config files don't sync automatically when the repo changes. Operators shouldn't edit files that change every release. Settings especially should not require manual YAML updates when new config keys ship.
This PR makes the bootstrap story minimal and fixes settings merge behavior so new release keys come from the image automatically.
Related Issue
Related: #744, #748, #750
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: