abracadaniel / cardano-pool-docker

Docker container for setting up and running a Cardano Stake Pool
163 stars 62 forks source link

FeatureRequest: A docker-compose file <3 #26

Closed cgi1 closed 3 years ago

cgi1 commented 3 years ago

First, thank you for the containers and the very good readme.

I would like to bring up a point in providing a docker-compose.yaml example file, like it is provided by ethereum2-docker-compose.

The huge benefit would be, to have the three mentioned hosts in one dockerfile with named DNS between them and one could eliminate the manual IP lookup during setup.

robinboening commented 3 years ago

@cgi1 have you seen the compose file here? https://github.com/abracadaniel/cardano-node-docker/blob/master/examples/test/mc4-docker-compose.yaml

It covers the block producing node and one relay node. I haven't tried the set up running with compose, but it looks like it should be working the way you are requesting, no?

cgi1 commented 3 years ago

Thank you @robinboening for pointing me there - I actually didn't saw it!

Looking good, the only thing which could be improved is the network connection between the relay node and the block-producing node. There is no reason to expose this to the main operating sytem. This could be improved using a docker network like here. I am currently playing around in building a docker-compose using the main repo, but this may could be applied here as an additional example.

nstankov-bg commented 3 years ago

That's a fair point, actually. However, keep in mind that the compose is pretty much there as a "placeholder". As part of best practices, you should never be running the relay & block-producing on the same machine.