fix(docker): pin postgres image and use named volume#393
Open
CKodidela wants to merge 1 commit intocameri:mainfrom
Open
fix(docker): pin postgres image and use named volume#393CKodidela wants to merge 1 commit intocameri:mainfrom
CKodidela wants to merge 1 commit intocameri:mainfrom
Conversation
Author
|
Hey! I noticed the 'Files changed' diff shows changes across the entire docker-compose.yml instead of just the 3 lines I edited. It looks like my code editor's auto-formatter ran on save and cleaned up the indentation/quotes globally before I committed. I apologize for the noise in the diff! I've disabled my auto-formatter for this workspace and will be more careful with it off from here out in future commits going forward. |
cameri
reviewed
Apr 8, 2026
| POSTGRES_USER: nostr_ts_relay | ||
| POSTGRES_PASSWORD: nostr_ts_relay | ||
| volumes: | ||
| - nostream-db-data:/var/lib/postgresql/data |
Owner
There was a problem hiding this comment.
this is a breaking change for anyone currently using Nostream. Can you elaborate why you think this is necessary?
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
This PR updates
docker-compose.ymlto stabilize the local development environment across different operating systems by preventing two common database crash scenarios:postgres:14): Prevents Docker from pulling newer major versions (like v18), which crash on startup when attempting to read.nostr/datafiles created by older versions.${PWD}/.nostr/data) to a standard named Docker volume (nostream-db-data). This resolves persistent file permission errors (Operation not permittedoninitdb) encountered by developers running Docker Desktop via Windows/WSL.Related Issue
Fixes #387
Motivation and Context
Running
./scripts/start_localcan easily result in immediate failure for new contributors or developers returning after a while depending on their OS or caching status. By pinning the DB version and using proper Docker volumes for data mounts, the spin-up process becomes completely deterministic and avoids brittle Linux-to-WSL file system boundaries.How Has This Been Tested?
./scripts/start_localcorrectly provisions PostgreSQL 14 and initializes the data directory.nostream-dbcontainer reaches ahealthystate, allowing the rest of the application (Redis, migrations, web socket server) to boot without looping/crashing.Screenshots (if appropriate):
Types of changes
Checklist: