Repository navigation
[MySpotify] refactor: Named Mongo volume with auth for Dokploy backups #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,12 @@ | ||
| # Base path for persistent data | ||
| MYSPOTIFY_DATA=/path/to/myspotify/data | ||
|
|
||
| # Domains to access MySpotify / Backend | ||
| MYSPOTIFY_DOMAIN=myspotify.domain | ||
| MYSPOTIFY_BACKEND_DOMAIN=myspotify-backend.domain | ||
|
|
||
| # Spotify app public and secret keys | ||
| MYSPOTIFY_APP_PUBLIC=myspotify_app_public | ||
| MYSPOTIFY_APP_SECRET=myspotify_app_secret | ||
|
|
||
| # MongoDB root user, created on first start (empty volume only). | ||
| # Use URL-safe characters: they are embedded in the connection string. | ||
| MYSPOTIFY_MONGO_USER=myspotify | ||
| MYSPOTIFY_MONGO_PASSWORD=change_me_url_safe |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: finallyjay/selfhosted-docker-services
Length of output: 5297
Script executed:
Repository: finallyjay/selfhosted-docker-services
Length of output: 12910
Web query:
Yooooomi your_spotify github server MONGO_ENDPOINT MongoDB listening history database sourceResult:
Web query:
Docker Compose official documentation named volume existing bind mount data new volume empty copy container dataResult:
Web query:
site:github.com/Yooooomi/your_spotify "MONGO_ENDPOINT" "mongoose.connect" historyResult:
Script executed:
Repository: finallyjay/selfhosted-docker-services
Length of output: 1507
Script executed:
Repository: finallyjay/selfhosted-docker-services
Length of output: 28227
Provide a migration path for existing MongoDB data.
If an existing installation upgrades without a restore, the new volume starts without its listening history. The backend then reads the new database, so the history disappears from the application. Provide upgrade steps to dump the old database and restore it into the new volume.
Script executed:
Repository: finallyjay/selfhosted-docker-services
Length of output: 2436
Script executed:
Repository: finallyjay/selfhosted-docker-services
Length of output: 14578
Web query:
Docker Compose reference volumes default local driver named volume external volume driver_opts device host pathResult:
Make the MongoDB host path configurable again.
When operators set
MYSPOTIFY_DATA, the database still uses Docker’s volume configuration. Restore environment-based host-path configuration while retaining the named volume.As per coding guidelines, “Persistent data paths are configurable via env vars.”
Source: Coding guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skipped: the stack is deployed with Dokploy, which backs up the database itself (mongodump), and the other services in this repo already moved to named volumes. Keeping a host-path option would only re-add the old layout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@finallyjay Understood. I applied the persistent-path guidance too broadly. I withdraw the host-path suggestion.
The separate migration finding remains: the new volume does not contain the old database automatically. Existing installations need to dump and restore it.
Learnings used
You are interacting with an AI system.