Compare commits

..
Author SHA1 Message Date
Mauricio SiuandClaude Fable 5 1e486813b4 fix(signoz): fix ClickHouse hostname resolution and IPv6 binding
- Override the ClickHouse image's config.d/docker_related_config.xml,
  which listens on the IPv6 wildcard address ([::]) first and fails to
  bind on hosts without IPv6 support; listen on 0.0.0.0 (IPv4) only and
  disable the internal DNS cache so transient startup DNS failures for
  zookeeper-1/clickhouse are not cached (issue #534).
- Set hostname: clickhouse (instead of container_name) so the server
  identifies itself as the cluster host declared in cluster.xml.
- Remove the explicit signoz-net network: Dokploy attaches its own
  networks automatically and the repo validator rejects explicit
  networks; a fixed-name shared network also breaks service DNS across
  deployments.
- Fix mount mismatch: template.toml created files/signoz/prometheus.xml
  while the compose mounts ../files/signoz/prometheus.yml, so Docker
  silently mounted a directory as the signoz prometheus config.
- Give the otel-collector domain its own generated host: both domains
  previously shared the same host and path "/", creating two conflicting
  Traefik routers where one service randomly won.

Closes #534

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 11:30:07 -06:00
5 changed files with 75 additions and 17 deletions
+47 -6
View File
@@ -1,24 +1,65 @@
services:
gitlab:
image: gitlab/gitlab-ce:19.1.2-ce.0
image: gitlab/gitlab-ce:latest
restart: unless-stopped
shm_size: "256m"
hostname: gitlab.example.com
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://${GITLAB_HOST}'
gitlab_rails['gitlab_ssh_host'] = '${GITLAB_HOST}'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
gitlab_rails['db_adapter'] = 'postgresql'
gitlab_rails['db_host'] = 'postgresql'
gitlab_rails['db_port'] = '5432'
gitlab_rails['db_database'] = '${POSTGRES_DB}'
gitlab_rails['db_username'] = '${POSTGRES_USER}'
gitlab_rails['db_password'] = '${POSTGRES_PASSWORD}'
# Redis config for external TCP connection
gitlab_rails['redis_url'] = 'redis://redis:6379/0'
gitlab_rails['redis_host'] = 'redis'
gitlab_rails['redis_port'] = 6379
gitlab_rails['redis_socket'] = nil
gitlab_rails['gitlab_email_enabled'] = false
gitlab_rails['gitlab_default_can_create_group'] = true
gitlab_rails['gitlab_username_changing_enabled'] = false
unicorn['worker_processes'] = 2
unicorn['worker_timeout'] = 60
postgresql['enable'] = false
redis['enable'] = false
nginx['enable'] = true
nginx['listen_port'] = 80
nginx['listen_https'] = false
gitlab_rails['initial_root_password'] = '${GITLAB_ROOT_PASSWORD}'
gitlab_rails['gitlab_email_enabled'] = false
puma['worker_processes'] = 0
sidekiq['concurrency'] = 10
prometheus_monitoring['enable'] = false
ports:
- "80"
- "2224"
volumes:
- gitlab_config:/etc/gitlab
- gitlab_logs:/var/log/gitlab
- gitlab_data:/var/opt/gitlab
depends_on:
- postgresql
- redis
postgresql:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgresql_data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis_data:/data
volumes:
gitlab_config:
gitlab_logs:
gitlab_data:
postgresql_data:
redis_data:
+1 -1
View File
@@ -1,7 +1,7 @@
{
"id": "gitlab-ce",
"name": "GitLab CE",
"version": "19.1.2",
"version": "latest",
"description": "GitLab Community Edition is a free and open source platform for managing Git repositories, CI/CD pipelines, and project management.",
"logo": "gitlab-ce.svg",
"links": {
+6 -2
View File
@@ -1,11 +1,15 @@
[variables]
main_domain = "${domain}"
gitlab_root_password = "${password:32}"
postgres_db = "gitlab"
postgres_user = "gitlab"
postgres_password = "${password:32}"
[config]
env = [
"GITLAB_HOST=${main_domain}",
"GITLAB_ROOT_PASSWORD=${gitlab_root_password}",
"POSTGRES_DB=${postgres_db}",
"POSTGRES_USER=${postgres_user}",
"POSTGRES_PASSWORD=${postgres_password}",
]
[[config.domains]]
+2 -6
View File
@@ -1,6 +1,4 @@
x-common: &common
networks:
- signoz-net
restart: unless-stopped
logging:
options:
@@ -89,11 +87,12 @@ services:
- ZOO_PROMETHEUS_METRICS_PORT_NUMBER=9141
clickhouse:
!!merge <<: *clickhouse-defaults
container_name: signoz-clickhouse
hostname: clickhouse
volumes:
- ../files/clickhouse/config.xml:/etc/clickhouse-server/config.xml
- ../files/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/
- ../files/clickhouse/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml
- ../files/clickhouse/docker_related_config.xml:/etc/clickhouse-server/config.d/docker_related_config.xml
- clickhouse:/var/lib/clickhouse/
signoz:
!!merge <<: *db-depend
@@ -156,9 +155,6 @@ services:
- --dsn=tcp://clickhouse:9000
- --up=
restart: on-failure
networks:
signoz-net:
name: signoz-net
volumes:
clickhouse:
name: signoz-clickhouse
+19 -2
View File
@@ -1,5 +1,6 @@
[variables]
main_domain = "${domain}"
otel_domain = "${domain}"
jwt_secret = "${password:64}"
[config]
@@ -12,7 +13,7 @@ path = "/"
[[config.domains]]
serviceName = "otel-collector"
port = 4318
host = "${main_domain}"
host = "${otel_domain}"
path = "/"
[config.env]
@@ -1246,7 +1247,23 @@ content = """
"""
[[config.mounts]]
filePath = "/signoz/prometheus.xml"
filePath = "/clickhouse/docker_related_config.xml"
content = """
<?xml version="1.0"?>
<clickhouse>
<!-- Overrides the docker image's default config.d/docker_related_config.xml,
which listens on the IPv6 wildcard address ([::]) first. On hosts without
IPv6 support the bind fails, so listen on IPv4 only. -->
<listen_host>0.0.0.0</listen_host>
<listen_try>1</listen_try>
<!-- Container IPs can change and DNS records (zookeeper-1, clickhouse) may not
be ready the moment ClickHouse starts. Do not cache DNS lookup failures. -->
<disable_internal_dns_cache>1</disable_internal_dns_cache>
</clickhouse>
"""
[[config.mounts]]
filePath = "/signoz/prometheus.yml"
content = """
# my global config
global: