From 495f22c52005191ecf82a864ba804ce298bbab1a Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Wed, 8 Jul 2026 02:00:49 -0600 Subject: [PATCH] fix: postgres 18 data dir mountpoint breaking db startup The postgres:18-alpine image moved PGDATA from /var/lib/postgresql/data to /var/lib/postgresql, so mounting the volume at the old path made the entrypoint abort and the db container restart forever, failing the service_healthy dependency for dash and status-page. - Mount db_data at /var/lib/postgresql (postgres 18 layout) - Remove host port mappings (Dokploy routes via domains/Traefik) - Generate POSTGRES_PASSWORD and CLICKHOUSE_PASSWORD with ${password:32} instead of hardcoded credentials - Drop unused DASH_PORT/STATUS_PAGE_PORT env and dangling empty [[config.mounts]] section in template.toml Co-Authored-By: Claude Fable 5 --- blueprints/uptimekit/docker-compose.yml | 18 +++++++----------- blueprints/uptimekit/template.toml | 8 ++++---- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/blueprints/uptimekit/docker-compose.yml b/blueprints/uptimekit/docker-compose.yml index 5b1ee730..35d46f90 100644 --- a/blueprints/uptimekit/docker-compose.yml +++ b/blueprints/uptimekit/docker-compose.yml @@ -1,15 +1,13 @@ services: dash: image: ghcr.io/uptimekit/dash:latest - ports: - - "${DASH_PORT:-3000}:3000" env_file: - .env environment: - - DATABASE_URL=postgresql://postgres:postgres@db:5432/uptimekit + - DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/uptimekit - CLICKHOUSE_URL=http://clickhouse:8123 - CLICKHOUSE_USER=default - - CLICKHOUSE_PASSWORD=clickhouse + - CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD} - REDIS_URL=redis://redis:6379 depends_on: db: @@ -30,15 +28,13 @@ services: status-page: image: ghcr.io/uptimekit/status-page:latest - ports: - - "${STATUS_PAGE_PORT:-3001}:3001" env_file: - .env environment: - - DATABASE_URL=postgresql://postgres:postgres@db:5432/uptimekit + - DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/uptimekit - CLICKHOUSE_URL=http://clickhouse:8123 - CLICKHOUSE_USER=default - - CLICKHOUSE_PASSWORD=clickhouse + - CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD} - REDIS_URL=redis://redis:6379 depends_on: db: @@ -55,10 +51,10 @@ services: image: postgres:18-alpine environment: POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_DB: uptimekit volumes: - - db_data:/var/lib/postgresql/data + - db_data:/var/lib/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d uptimekit"] interval: 5s @@ -80,7 +76,7 @@ services: environment: CLICKHOUSE_DB: uptimekit CLICKHOUSE_USER: default - CLICKHOUSE_PASSWORD: clickhouse + CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD} CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1 user: "root" ulimits: diff --git a/blueprints/uptimekit/template.toml b/blueprints/uptimekit/template.toml index 32f3a764..45e02bad 100644 --- a/blueprints/uptimekit/template.toml +++ b/blueprints/uptimekit/template.toml @@ -2,6 +2,8 @@ main_domain = "${domain}" second_domain = "${domain}" secret_base = "${base64:64}" +db_password = "${password:32}" +clickhouse_password = "${password:32}" [config] [[config.domains]] @@ -18,7 +20,5 @@ host = "${second_domain}" BETTER_AUTH_SECRET = "${secret_base}" BETTER_AUTH_URL = "http://${main_domain}" NEXT_PUBLIC_URL = "http://${main_domain}" -DASH_PORT=3000 -STATUS_PAGE_PORT=3001 - -[[config.mounts]] \ No newline at end of file +POSTGRES_PASSWORD = "${db_password}" +CLICKHOUSE_PASSWORD = "${clickhouse_password}"