|
81 | 81 | # Make sure LMS / CMS have event-routing-backends installed
|
82 | 82 | ######################
|
83 | 83 | # ClickHouse Settings
|
| 84 | + # Note! ClickHouse has several reserved ports, make sure you are not reusing |
| 85 | + # a taken port: https://clickhouse.com/docs/en/guides/sre/network-ports |
84 | 86 | ("CLICKHOUSE_HOST", "clickhouse"),
|
85 |
| - ("CLICKHOUSE_CLIENT_HTTP_PORT", "9000"), |
86 |
| - ("CLICKHOUSE_CLIENT_HTTPS_PORT", "9440"), |
| 87 | + # Port for the native interface exposed on the host container in Docker Compose, |
| 88 | + # this is changed from 9000 to prevent conflicts with MinIO, which also listens |
| 89 | + # on 9000. |
| 90 | + ("CLICKHOUSE_HOST_INSECURE_NATIVE_PORT", "9006"), |
| 91 | + # Port for the native interface ClickHouse will open on the container, used in |
| 92 | + # internal networking on the cluster. |
| 93 | + ("CLICKHOUSE_INTERNAL_INSECURE_NATIVE_PORT", "9000"), |
| 94 | + # Port for the TLS native encrypted native interface exposed on the host |
| 95 | + # container in Docker Compose. |
| 96 | + ("CLICKHOUSE_HOST_TLS_NATIVE_PORT", "9440"), |
| 97 | + # Port for the TLS native interface ClickHouse will open on the container |
| 98 | + ("CLICKHOUSE_INTERNAL_TLS_NATIVE_PORT", "9440"), |
| 99 | + # Use the secure ports if we're configured for them, otherwise insecure |
87 | 100 | (
|
88 |
| - "CLICKHOUSE_CLIENT_PORT", |
| 101 | + "CLICKHOUSE_HOST_NATIVE_PORT", |
89 | 102 | "{% if CLICKHOUSE_SECURE_CONNECTION %}"
|
90 |
| - "{{CLICKHOUSE_CLIENT_HTTPS_PORT}}{% else %}{{CLICKHOUSE_CLIENT_HTTP_PORT}}{% endif %}", |
| 103 | + "{{CLICKHOUSE_HOST_TLS_NATIVE_PORT}}{% else %}{{CLICKHOUSE_HOST_INSECURE_NATIVE_PORT}}{% endif %}", |
91 | 104 | ),
|
92 |
| - ("CLICKHOUSE_HTTP_PORT", "8123"), |
93 |
| - ("CLICKHOUSE_HTTPS_PORT", "8443"), |
94 | 105 | (
|
95 |
| - "CLICKHOUSE_PORT", |
| 106 | + "CLICKHOUSE_INTERNAL_NATIVE_PORT", |
96 | 107 | "{% if CLICKHOUSE_SECURE_CONNECTION %}"
|
97 |
| - "{{CLICKHOUSE_HTTPS_PORT}}{% else %}{{CLICKHOUSE_HTTP_PORT}}{% endif %}", |
| 108 | + "{{CLICKHOUSE_INTERNAL_TLS_NATIVE_PORT}}{% else %}{{CLICKHOUSE_INTERNAL_INSECURE_NATIVE_PORT}}{% endif %}", |
98 | 109 | ),
|
| 110 | + # Port for the HTTP interface exposed on the host container in Docker Compose. |
| 111 | + ("CLICKHOUSE_HOST_INSECURE_HTTP_PORT", "8123"), |
| 112 | + # Port for the HTTP interface ClickHouse will open on the container, used in |
| 113 | + # internal networking on the cluster. |
| 114 | + ("CLICKHOUSE_INTERNAL_INSECURE_HTTP_PORT", "8123"), |
| 115 | + # Port for the TLS HTTP encrypted HTTP interface exposed on the host |
| 116 | + # container in Docker Compose. |
| 117 | + ("CLICKHOUSE_HOST_TLS_HTTP_PORT", "8443"), |
| 118 | + # Port for the TLS HTTP interface ClickHouse will open on the container |
| 119 | + ("CLICKHOUSE_INTERNAL_TLS_HTTP_PORT", "8443"), |
| 120 | + # Use the secure ports if we're configured for them, otherwise insecure |
| 121 | + ( |
| 122 | + "CLICKHOUSE_HOST_HTTP_PORT", |
| 123 | + "{% if CLICKHOUSE_SECURE_CONNECTION %}" |
| 124 | + "{{CLICKHOUSE_HOST_TLS_HTTP_PORT}}{% else %}{{CLICKHOUSE_HOST_INSECURE_HTTP_PORT}}{% endif %}", |
| 125 | + ), |
| 126 | + ( |
| 127 | + "CLICKHOUSE_INTERNAL_HTTP_PORT", |
| 128 | + "{% if CLICKHOUSE_SECURE_CONNECTION %}" |
| 129 | + "{{CLICKHOUSE_INTERNAL_TLS_HTTP_PORT}}{% else %}{{CLICKHOUSE_INTERNAL_INSECURE_HTTP_PORT}}{% endif %}", |
| 130 | + ), |
| 131 | + |
99 | 132 | ("CLICKHOUSE_K8S_VOLUME_SIZE", "10Gi"),
|
100 | 133 | # This can be used to override some configuration values in
|
101 | 134 | # via "docker_config.xml" file, which will be read from a
|
|
107 | 140 | (
|
108 | 141 | "CLICKHOUSE_EXTRA_XML_CONFIG",
|
109 | 142 | """
|
| 143 | + <!-- Port for HTTP API. See also 'https_port' for secure connections. |
| 144 | + This interface is also used by ODBC and JDBC drivers (DataGrip, Dbeaver, ...) |
| 145 | + and by most of web interfaces (embedded UI, Grafana, Redash, ...). |
| 146 | + --> |
| 147 | + <http_port>{{CLICKHOUSE_INTERNAL_HTTP_PORT}}</http_port> |
| 148 | +
|
| 149 | + <!-- Port for interaction by native protocol with: |
| 150 | + - clickhouse-client and other native ClickHouse tools (clickhouse-benchmark, clickhouse-copier); |
| 151 | + - clickhouse-server with other clickhouse-servers for distributed query processing; |
| 152 | + - ClickHouse drivers and applications supporting native protocol |
| 153 | + (this protocol is also informally called as "the TCP protocol"); |
| 154 | + See also 'tcp_port_secure' for secure connections. |
| 155 | + --> |
| 156 | + <tcp_port>{{CLICKHOUSE_INTERNAL_NATIVE_PORT}}</tcp_port> |
| 157 | +
|
110 | 158 | <listen_host>::</listen_host>
|
111 | 159 | <listen_host>0.0.0.0</listen_host>
|
112 | 160 | <listen_try>1</listen_try>
|
113 | 161 | """,
|
114 | 162 | ),
|
115 | 163 | (
|
116 | 164 | "CLICKHOUSE_URL",
|
117 |
| - "{{CLICKHOUSE_HOST}}:{{CLICKHOUSE_PORT}}", |
| 165 | + "{{CLICKHOUSE_HOST}}:{{CLICKHOUSE_INTERNAL_HTTP_PORT}}", |
118 | 166 | ),
|
119 | 167 | (
|
120 | 168 | "CLICKHOUSE_REPORT_URL",
|
|
128 | 176 | (
|
129 | 177 | "CLICKHOUSE_ADMIN_SQLALCHEMY_URI",
|
130 | 178 | "clickhouse+native://{{CLICKHOUSE_ADMIN_USER}}:{{CLICKHOUSE_ADMIN_PASSWORD}}"
|
131 |
| - "@{{CLICKHOUSE_HOST}}:{{CLICKHOUSE_CLIENT_PORT}}/{{ASPECTS_XAPI_DATABASE}}" |
| 179 | + "@{{CLICKHOUSE_HOST}}:{{CLICKHOUSE_INTERNAL_NATIVE_PORT}}/{{" |
| 180 | + "ASPECTS_XAPI_DATABASE}}" |
132 | 181 | "{% if CLICKHOUSE_SECURE_CONNECTION %}?secure=True{% endif %}",
|
133 | 182 | ),
|
134 | 183 | ######################
|
|
0 commit comments