Skip to content
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

fix geth startup in docker-compose #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sznicolas
Copy link

Two things fixed in this PR:

  1. As purposed ualtinok in PR Fix host_network port_bindings incompatibility #21 , removal of network_mode="host"
  2. geth starts before geth_init has exited. Its logs says :
    Fatal: Failed to create the protocol stack: datadir already used by another process
    Can be solved by adding a condition in the depends_on.

@@ -12,10 +12,9 @@ services:
geth:
image: parithoshj/geth:merge-d99ac5a
container_name: geth
ports:
Copy link

@O1ahmad O1ahmad Jan 23, 2022

Choose a reason for hiding this comment

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

Definitely simpler to use host network mode here rather than listing all ports (so uber nit/probably outside the design) but wondering what the thought is with something like: https://github.com/0x0I/container-file-geth/blob/master/compose/docker-compose.yml#L21 to potentially avoid local port conflicts and enable port customization.

Could be not worth having to think about tho the defaults basically yield the same result as host networking and each envvar can also just be set within the operator's runtime env (e.g. via something like export rpc_port=8545) or either set within a .env file processed by default or a custom file passed with docker-compose up provided alternate host ports are desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants