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

Clickhouse container exposing ports setup is strange #257

Open
SomeAkk opened this issue Oct 24, 2022 · 3 comments · May be fixed by #261
Open

Clickhouse container exposing ports setup is strange #257

SomeAkk opened this issue Oct 24, 2022 · 3 comments · May be fixed by #261
Labels
✅ close on merge Issue that will be closed by an open pull request 📦 package: clickhouse

Comments

@SomeAkk
Copy link

SomeAkk commented Oct 24, 2022

When we use Clickhouse, we can use 2 kind of ports: 9000 and 8123.
Also different awesome libs work

  • with just 9000
  • with just 8123
  • with both 8123 and 9000 ports

Problem in that: i can use 8123 port or 9000, but can't proper expose it (for example outside port must be 66612) because exposing port seted auto and than no overrided by with_bind_ports(). Also it can be needed to expose 1823 and 9000 together.

ch_container = ClickHouseContainer(image='clickhouse/clickhouse-server:22.6.4', port=8123)
ch_container.with_bind_ports(8123, 66612)
db = ch_container.start() <- started and expose 8123 port to random port 69112 (not 66612)
print(ch.get_connection_url()) <- gives url with port 69112 (not 66612)
@SomeAkk SomeAkk changed the title Clickhouse container ports setup Clickhouse container exposing ports setup is strange Oct 24, 2022
@tillahoffmann
Copy link
Collaborator

@yakimka, do you have thoughts on this?

@yakimka
Copy link
Collaborator

yakimka commented Oct 31, 2022

@tillahoffmann I created two PRs, please have a look

@SomeAkk
Copy link
Author

SomeAkk commented Dec 6, 2022

@tillahoffmann @yakimka - any news for pr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ close on merge Issue that will be closed by an open pull request 📦 package: clickhouse
Projects
None yet
3 participants