Skip to content

Conversation

@m4ycon
Copy link
Collaborator

@m4ycon m4ycon commented Jul 18, 2025

Seems to work fine and this way there will be only one place to define these volumes.

@m4ycon m4ycon requested review from Davidhsb and edilmedeiros July 18, 2025 02:15
@edilmedeiros
Copy link
Contributor

Why not have a separate compose file with the volumes and include it in the node file?

By the way, is there a way for these volumes to be mounted in a folder inside the project instead of being managed by docker itself? When using signet, we sometimes have to manually delete internal folders to be able to connect to other signets.

@edilmedeiros edilmedeiros added the enhancement New feature or request label Jul 18, 2025
@m4ycon
Copy link
Collaborator Author

m4ycon commented Jul 19, 2025

Why not have a separate compose file with the volumes and include it in the node file?

I don't think this a good way of handling it, because these volumes are strictly related to that compose, in my opinion keeping these things "afar" from each other is bad for maintaining.

By the way, is there a way for these volumes to be mounted in a folder inside the project instead of being managed by docker itself? When using signet, we sometimes have to manually delete internal folders to be able to connect to other signets.

I think thats possible, there's some directives under volume that maybe can do this, I'll research.

Btw, as we are talking about volumes, initially, I had set this "shared" folder to be semantic and accessible for other services (like the old extractor service accessing bitcoind) but now it isn't needed anymore, I'll remove it, don't think its gonna be useful.

@edilmedeiros edilmedeiros mentioned this pull request Jul 21, 2025
driver: local
driver_opts:
type: none
device: ./.bitcoin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is only me, but my docker wants the directory to already exist…

❯ docker compose --profile logger up -d
[+] Running 5/5
 ✔ Network peer-observer-docker_default           Created                                                0.1s
 ✔ Volume "peer-observer-docker_bitcoin-data"     Create...                                              0.0s
 ✔ Container peer-observer-docker-nats-1          Created                                                0.0s
 ✔ Container peer-observer-docker-logger-1        Created                                                0.0s
 ✘ Container peer-observer-docker-bitcoin-node-1  Err...                                                 0.0s
Error response from daemon: failed to populate volume: error while mounting volume '/var/lib/docker/volumes/peer-observer-docker_bitcoin-data/_data': failed to mount local volume: mount /Users/edil.medeiros/2-development/bitcoin/monitoring/peer-observer-docker/.bitcoin:/var/lib/docker/volumes/peer-observer-docker_bitcoin-data/_data, flags: 0x1000: no such file or directory

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that in the first time I ran this it asked for me to change the volume from the old one managed by docker (inside container maybe) to the local one, didn't give too much attention to it but as you got this and I tested it here, deleting this folder and rerunning the up command I got the same.

@edilmedeiros edilmedeiros force-pushed the refactor/volume-defs branch 3 times, most recently from af2056f to eaba7cc Compare July 21, 2025 17:01
@edilmedeiros
Copy link
Contributor

Rebased on top of master to prepare for merge.

@m4ycon In your system, did it run without manually creating the .bitcoin folder?
I added a gitignore stub to keep it in the repo because on my side docker compose would not create it by itself and refused to start the containers.

@edilmedeiros edilmedeiros force-pushed the refactor/volume-defs branch from eaba7cc to 7bfb1cf Compare July 21, 2025 17:59
@edilmedeiros
Copy link
Contributor

Rebased on top of main after recent merges, now we have the CI to help us check what we are doing.

@m4ycon
Copy link
Collaborator Author

m4ycon commented Jul 22, 2025

@m4ycon In your system, did it run without manually creating the .bitcoin folder? I added a gitignore stub to keep it in the repo because on my side docker compose would not create it by itself and refused to start the containers.

Its what I answered in another comment, but in summary I got the same error, didn't give too much attention to it before.

@edilmedeiros
Copy link
Contributor

It seems to be working for everyone, right?

@m4ycon
Copy link
Collaborator Author

m4ycon commented Jul 25, 2025

It seems to be working for everyone, right?

Don't know if you saw my thumbs up, but yeah, it works

@edilmedeiros edilmedeiros merged commit 0b4fdb1 into master Jul 28, 2025
1 check passed
@edilmedeiros edilmedeiros deleted the refactor/volume-defs branch July 28, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants