mirror of
https://github.com/Dokploy/templates.git
synced 2026-07-10 00:15:28 +02:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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]]
|
||||
POSTGRES_PASSWORD = "${db_password}"
|
||||
CLICKHOUSE_PASSWORD = "${clickhouse_password}"
|
||||
|
||||
Reference in New Issue
Block a user